@@ -1,5 +1,5 | |||||
1 | # Redmine - project management software |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
@@ -17,12 +17,13 | |||||
17 |
|
17 | |||
18 | require File.expand_path('../../test_helper', __FILE__) |
|
18 | require File.expand_path('../../test_helper', __FILE__) | |
19 | require 'sys_controller' |
|
19 | require 'sys_controller' | |
|
20 | require 'mocha' | |||
20 |
|
21 | |||
21 | # Re-raise errors caught by the controller. |
|
22 | # Re-raise errors caught by the controller. | |
22 | class SysController; def rescue_action(e) raise e end; end |
|
23 | class SysController; def rescue_action(e) raise e end; end | |
23 |
|
24 | |||
24 | class SysControllerTest < ActionController::TestCase |
|
25 | class SysControllerTest < ActionController::TestCase | |
25 | fixtures :projects, :repositories |
|
26 | fixtures :projects, :repositories, :enabled_modules | |
26 |
|
27 | |||
27 | def setup |
|
28 | def setup | |
28 | @controller = SysController.new |
|
29 | @controller = SysController.new | |
@@ -55,11 +56,13 class SysControllerTest < ActionController::TestCase | |||||
55 | end |
|
56 | end | |
56 |
|
57 | |||
57 | def test_fetch_changesets |
|
58 | def test_fetch_changesets | |
|
59 | Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true) | |||
58 | get :fetch_changesets |
|
60 | get :fetch_changesets | |
59 | assert_response :success |
|
61 | assert_response :success | |
60 | end |
|
62 | end | |
61 |
|
63 | |||
62 | def test_fetch_changesets_one_project |
|
64 | def test_fetch_changesets_one_project | |
|
65 | Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true) | |||
63 | get :fetch_changesets, :id => 'ecookbook' |
|
66 | get :fetch_changesets, :id => 'ecookbook' | |
64 | assert_response :success |
|
67 | assert_response :success | |
65 | end |
|
68 | end |
General Comments 0
You need to be logged in to leave comments.
Login now