##// END OF EJS Templates
scm: git: fix incorrect comment in unit model test and code clean up unit model test....
Toshi MARUYAMA -
r5602:f3a069281ec9
parent child
Show More
@@ -78,13 +78,19 class RepositoryGitTest < ActiveSupport::TestCase
78 78
79 79 def test_fetch_changesets_incremental
80 80 @repository.fetch_changesets
81 # Remove the 3 latest changesets
82 @repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 8).each(&:destroy)
81
82 # Remove the latest changesets
83 @repository.changesets.find(
84 :all,
85 :order => 'committed_on DESC',
86 :limit => 8).each(&:destroy)
83 87 @repository.reload
84 88 cs1 = @repository.changesets
85 89 assert_equal 13, cs1.count
86 90
87 rev_a_commit = @repository.changesets.find(:first, :order => 'committed_on DESC')
91 rev_a_commit = @repository.changesets.find(
92 :first,
93 :order => 'committed_on DESC')
88 94 assert_equal '4f26664364207fa8b1af9f8722647ab2d4ac5d43', rev_a_commit.revision
89 95 # Mon Jul 5 22:34:26 2010 +0200
90 96 rev_a_committed_on = Time.gm(2010, 7, 5, 20, 34, 26)
@@ -243,14 +249,16 class RepositoryGitTest < ActiveSupport::TestCase
243 249 def test_identifier
244 250 @repository.fetch_changesets
245 251 @repository.reload
246 c = @repository.changesets.find_by_revision('7234cb2750b63f47bff735edc50a1c0a433c2518')
252 c = @repository.changesets.find_by_revision(
253 '7234cb2750b63f47bff735edc50a1c0a433c2518')
247 254 assert_equal c.scmid, c.identifier
248 255 end
249 256
250 257 def test_format_identifier
251 258 @repository.fetch_changesets
252 259 @repository.reload
253 c = @repository.changesets.find_by_revision('7234cb2750b63f47bff735edc50a1c0a433c2518')
260 c = @repository.changesets.find_by_revision(
261 '7234cb2750b63f47bff735edc50a1c0a433c2518')
254 262 assert_equal '7234cb27', c.format_identifier
255 263 end
256 264
@@ -271,7 +279,8 class RepositoryGitTest < ActiveSupport::TestCase
271 279 if str_felix_hex.respond_to?(:force_encoding)
272 280 str_felix_hex.force_encoding('UTF-8')
273 281 end
274 c = @repository.changesets.find_by_revision('ed5bb786bbda2dee66a2d50faf51429dbc043a7b')
282 c = @repository.changesets.find_by_revision(
283 'ed5bb786bbda2dee66a2d50faf51429dbc043a7b')
275 284 assert_equal "#{str_felix_hex} <felix@fachschaften.org>", c.committer
276 285 end
277 286
General Comments 0
You need to be logged in to leave comments. Login now