##// END OF EJS Templates
remove trailing white-spaces from test/functional/watchers_controller_test.rb....
Toshi MARUYAMA -
r6506:e5ccceae184d
parent child
Show More
@@ -5,12 +5,12
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 #
8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 #
13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -24,20 +24,20 class WatchersController; def rescue_action(e) raise e end; end
24 24 class WatchersControllerTest < ActionController::TestCase
25 25 fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
26 26 :issues, :trackers, :projects_trackers, :issue_statuses, :enumerations, :watchers
27
27
28 28 def setup
29 29 @controller = WatchersController.new
30 30 @request = ActionController::TestRequest.new
31 31 @response = ActionController::TestResponse.new
32 32 User.current = nil
33 33 end
34
34
35 35 def test_get_watch_should_be_invalid
36 36 @request.session[:user_id] = 3
37 37 get :watch, :object_type => 'issue', :object_id => '1'
38 38 assert_response 405
39 39 end
40
40
41 41 def test_watch
42 42 @request.session[:user_id] = 3
43 43 assert_difference('Watcher.count') do
@@ -47,7 +47,7 class WatchersControllerTest < ActionController::TestCase
47 47 end
48 48 assert Issue.find(1).watched_by?(User.find(3))
49 49 end
50
50
51 51 def test_watch_should_be_denied_without_permission
52 52 Role.find(2).remove_permission! :view_issues
53 53 @request.session[:user_id] = 3
@@ -56,7 +56,7 class WatchersControllerTest < ActionController::TestCase
56 56 assert_response 403
57 57 end
58 58 end
59
59
60 60 def test_unwatch
61 61 @request.session[:user_id] = 3
62 62 assert_difference('Watcher.count', -1) do
@@ -76,7 +76,7 class WatchersControllerTest < ActionController::TestCase
76 76 end
77 77 assert Issue.find(2).watched_by?(User.find(4))
78 78 end
79
79
80 80 def test_remove_watcher
81 81 @request.session[:user_id] = 2
82 82 assert_difference('Watcher.count', -1) do
General Comments 0
You need to be logged in to leave comments. Login now