mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-25 18:26:10 +01:00
fix #1307 and add basic test
This commit is contained in:
parent
6e1ad5e200
commit
5a24644aad
3 changed files with 26 additions and 173 deletions
21
test/functional/search_controller_test.rb
Normal file
21
test/functional/search_controller_test.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
||||
|
||||
class SearchControllerTest < ActionController::TestCase
|
||||
|
||||
def setup
|
||||
end
|
||||
|
||||
def test_get_search_page
|
||||
login_as :admin_user
|
||||
get :index
|
||||
assert_response 200
|
||||
end
|
||||
|
||||
def test_search_for_todo_with_tag
|
||||
login_as :admin_user
|
||||
post :results, :search => "gates"
|
||||
assert_response 200
|
||||
assert_equal 3, assigns['count'], "should have found 3 todos"
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue