Mercurial > hg > soundsoftware-site
comparison test/functional/.svn/text-base/search_controller_test.rb.svn-base @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 94944d00e43c |
children | cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
1 require File.dirname(__FILE__) + '/../test_helper' | 1 require File.expand_path('../../test_helper', __FILE__) |
2 require 'search_controller' | 2 require 'search_controller' |
3 | 3 |
4 # Re-raise errors caught by the controller. | 4 # Re-raise errors caught by the controller. |
5 class SearchController; def rescue_action(e) raise e end; end | 5 class SearchController; def rescue_action(e) raise e end; end |
6 | 6 |
81 get :index, :id => 1, :q => "stringforcustomfield" | 81 get :index, :id => 1, :q => "stringforcustomfield" |
82 assert_response :success | 82 assert_response :success |
83 results = assigns(:results) | 83 results = assigns(:results) |
84 assert_not_nil results | 84 assert_not_nil results |
85 assert_equal 1, results.size | 85 assert_equal 1, results.size |
86 assert results.include?(Issue.find(3)) | 86 assert results.include?(Issue.find(7)) |
87 end | 87 end |
88 | 88 |
89 def test_search_all_words | 89 def test_search_all_words |
90 # 'all words' is on by default | 90 # 'all words' is on by default |
91 get :index, :id => 1, :q => 'recipe updating saving' | 91 get :index, :id => 1, :q => 'recipe updating saving' |