Mercurial > hg > soundsoftware-site
diff test/functional/.svn/text-base/watchers_controller_test.rb.svn-base @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 8661b858af72 |
children |
line wrap: on
line diff
--- a/test/functional/.svn/text-base/watchers_controller_test.rb.svn-base Thu Mar 03 11:42:28 2011 +0000 +++ b/test/functional/.svn/text-base/watchers_controller_test.rb.svn-base Mon Jun 06 14:24:13 2011 +0100 @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2008 Jean-Philippe Lang +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -43,7 +43,7 @@ assert_difference('Watcher.count') do xhr :post, :watch, :object_type => 'issue', :object_id => '1' assert_response :success - assert_select_rjs :replace_html, 'watcher' + assert @response.body.include?('$$(".issue-1-watcher")') end assert Issue.find(1).watched_by?(User.find(3)) end @@ -56,34 +56,13 @@ assert_response 403 end end - - def test_watch_with_multiple_replacements - @request.session[:user_id] = 3 - assert_difference('Watcher.count') do - xhr :post, :watch, :object_type => 'issue', :object_id => '1', :replace => ['watch_item_1','watch_item_2'] - assert_response :success - assert_select_rjs :replace_html, 'watch_item_1' - assert_select_rjs :replace_html, 'watch_item_2' - end - end def test_unwatch @request.session[:user_id] = 3 assert_difference('Watcher.count', -1) do xhr :post, :unwatch, :object_type => 'issue', :object_id => '2' assert_response :success - assert_select_rjs :replace_html, 'watcher' - end - assert !Issue.find(1).watched_by?(User.find(3)) - end - - def test_unwatch_with_multiple_replacements - @request.session[:user_id] = 3 - assert_difference('Watcher.count', -1) do - xhr :post, :unwatch, :object_type => 'issue', :object_id => '2', :replace => ['watch_item_1', 'watch_item_2'] - assert_response :success - assert_select_rjs :replace_html, 'watch_item_1' - assert_select_rjs :replace_html, 'watch_item_2' + assert @response.body.include?('$$(".issue-2-watcher")') end assert !Issue.find(1).watched_by?(User.find(3)) end