diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/my_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/versions_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/watchers_controller_test.rb | 4 | ||||
-rw-r--r-- | test/functional/welcome_controller_test.rb | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index a543189ed..fab6c553e 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -194,7 +194,7 @@ class MyControllerTest < ActionController::TestCase end def test_order_blocks - xhr :post, :order_blocks, :group => 'left', 'list-left' => ['documents', 'calendar', 'latestnews'] + xhr :post, :order_blocks, :group => 'left', 'blocks' => ['documents', 'calendar', 'latestnews'] assert_response :success assert_equal ['documents', 'calendar', 'latestnews'], User.find(2).pref[:my_page_layout]['left'] end diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index 449c097e3..7ca9bf06b 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -41,7 +41,7 @@ class VersionsControllerTest < ActionController::TestCase # Completed version doesn't appear assert !assigns(:versions).include?(Version.find(1)) # Context menu on issues - assert_select "script", :text => Regexp.new(Regexp.escape("new ContextMenu('/issues/context_menu')")) + assert_select "script", :text => Regexp.new(Regexp.escape("contextMenuInit('/issues/context_menu')")) # Links to versions anchors assert_tag 'a', :attributes => {:href => '#2.0'}, :ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}} diff --git a/test/functional/watchers_controller_test.rb b/test/functional/watchers_controller_test.rb index 91324edf0..6bf6e25b2 100644 --- a/test/functional/watchers_controller_test.rb +++ b/test/functional/watchers_controller_test.rb @@ -37,7 +37,7 @@ class WatchersControllerTest < ActionController::TestCase assert_difference('Watcher.count') do xhr :post, :watch, :object_type => 'issue', :object_id => '1' assert_response :success - assert @response.body.include?('$$(".issue-1-watcher")') + assert_include '$(".issue-1-watcher")', response.body end assert Issue.find(1).watched_by?(User.find(3)) end @@ -72,7 +72,7 @@ class WatchersControllerTest < ActionController::TestCase assert_difference('Watcher.count', -1) do xhr :post, :unwatch, :object_type => 'issue', :object_id => '2' assert_response :success - assert @response.body.include?('$$(".issue-2-watcher")') + assert_include '$(".issue-2-watcher")', response.body end assert !Issue.find(1).watched_by?(User.find(3)) end diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb index a846d1aaf..8106f60a1 100644 --- a/test/functional/welcome_controller_test.rb +++ b/test/functional/welcome_controller_test.rb @@ -77,7 +77,7 @@ class WelcomeControllerTest < ActionController::TestCase get :index assert_tag 'script', :attributes => {:type => "text/javascript"}, - :content => %r{new WarnLeavingUnsaved} + :content => %r{warnLeavingUnsaved} end def test_warn_on_leaving_unsaved_turn_off @@ -89,7 +89,7 @@ class WelcomeControllerTest < ActionController::TestCase get :index assert_no_tag 'script', :attributes => {:type => "text/javascript"}, - :content => %r{new WarnLeavingUnsaved} + :content => %r{warnLeavingUnsaved} end def test_call_hook_mixed_in |