##// END OF EJS Templates
scm: code clean up unit repository test....
Toshi MARUYAMA -
r5538:c33be450e718
parent child
Show More
@@ -1,16 +1,16
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
1 # Redmine - project management software
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
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.
@@ -41,7 +41,7 class RepositoryTest < ActiveSupport::TestCase
41 41 def test_create
42 42 repository = Repository::Subversion.new(:project => Project.find(3))
43 43 assert !repository.save
44
44
45 45 repository.url = "svn://localhost"
46 46 assert repository.save
47 47 repository.reload
@@ -164,22 +164,22 class RepositoryTest < ActiveSupport::TestCase
164 164
165 165 def test_auto_user_mapping_by_username
166 166 c = Changeset.create!(
167 :repository => @repository,
168 :committer => 'jsmith',
167 :repository => @repository,
168 :committer => 'jsmith',
169 169 :committed_on => Time.now,
170 :revision => 100,
171 :comments => 'Committed by john.'
170 :revision => 100,
171 :comments => 'Committed by john.'
172 172 )
173 173 assert_equal User.find(2), c.user
174 174 end
175 175
176 176 def test_auto_user_mapping_by_email
177 177 c = Changeset.create!(
178 :repository => @repository,
179 :committer => 'john <jsmith@somenet.foo>',
178 :repository => @repository,
179 :committer => 'john <jsmith@somenet.foo>',
180 180 :committed_on => Time.now,
181 :revision => 100,
182 :comments => 'Committed by john.'
181 :revision => 100,
182 :comments => 'Committed by john.'
183 183 )
184 184 assert_equal User.find(2), c.user
185 185 end
General Comments 0
You need to be logged in to leave comments. Login now