@@ -22,7 +22,9 require 'repositories_controller' | |||
|
22 | 22 | class RepositoriesController; def rescue_action(e) raise e end; end |
|
23 | 23 | |
|
24 | 24 | class RepositoriesControllerTest < ActionController::TestCase |
|
25 | fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers | |
|
25 | fixtures :projects, :users, :roles, :members, :member_roles, | |
|
26 | :repositories, :issues, :issue_statuses, :changesets, :changes, | |
|
27 | :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers | |
|
26 | 28 | |
|
27 | 29 | def setup |
|
28 | 30 | @controller = RepositoriesController.new |
@@ -72,7 +74,13 class RepositoriesControllerTest < ActionController::TestCase | |||
|
72 | 74 | def test_committers |
|
73 | 75 | @request.session[:user_id] = 2 |
|
74 | 76 | # add a commit with an unknown user |
|
75 | Changeset.create!(:repository => Project.find(1).repository, :committer => 'foo', :committed_on => Time.now, :revision => 100, :comments => 'Committed by foo.') | |
|
77 | Changeset.create!( | |
|
78 | :repository => Project.find(1).repository, | |
|
79 | :committer => 'foo', | |
|
80 | :committed_on => Time.now, | |
|
81 | :revision => 100, | |
|
82 | :comments => 'Committed by foo.' | |
|
83 | ) | |
|
76 | 84 | |
|
77 | 85 | get :committers, :id => 1 |
|
78 | 86 | assert_response :success |
@@ -94,8 +102,13 class RepositoriesControllerTest < ActionController::TestCase | |||
|
94 | 102 | def test_map_committers |
|
95 | 103 | @request.session[:user_id] = 2 |
|
96 | 104 | # add a commit with an unknown user |
|
97 | c = Changeset.create!(:repository => Project.find(1).repository, :committer => 'foo', :committed_on => Time.now, :revision => 100, :comments => 'Committed by foo.') | |
|
98 | ||
|
105 | c = Changeset.create!( | |
|
106 | :repository => Project.find(1).repository, | |
|
107 | :committer => 'foo', | |
|
108 | :committed_on => Time.now, | |
|
109 | :revision => 100, | |
|
110 | :comments => 'Committed by foo.' | |
|
111 | ) | |
|
99 | 112 | assert_no_difference "Changeset.count(:conditions => 'user_id = 3')" do |
|
100 | 113 | post :committers, :id => 1, :committers => { '0' => ['foo', '2'], '1' => ['dlopper', '3']} |
|
101 | 114 | assert_redirected_to '/projects/ecookbook/repository/committers' |
General Comments 0
You need to be logged in to leave comments.
Login now