Mercurial > hg > soundsoftware-site
comparison test/unit/changeset_test.rb @ 1494:e248c7af89ec redmine-2.4
Update to Redmine SVN revision 12979 on 2.4-stable branch
author | Chris Cannam |
---|---|
date | Mon, 17 Mar 2014 08:54:02 +0000 |
parents | 261b3d9a4903 |
children | dffacf8a6908 |
comparison
equal
deleted
inserted
replaced
1464:261b3d9a4903 | 1494:e248c7af89ec |
---|---|
1 # encoding: utf-8 | 1 # encoding: utf-8 |
2 # | 2 # |
3 # Redmine - project management software | 3 # Redmine - project management software |
4 # Copyright (C) 2006-2013 Jean-Philippe Lang | 4 # Copyright (C) 2006-2014 Jean-Philippe Lang |
5 # | 5 # |
6 # This program is free software; you can redistribute it and/or | 6 # This program is free software; you can redistribute it and/or |
7 # modify it under the terms of the GNU General Public License | 7 # modify it under the terms of the GNU General Public License |
8 # as published by the Free Software Foundation; either version 2 | 8 # as published by the Free Software Foundation; either version 2 |
9 # of the License, or (at your option) any later version. | 9 # of the License, or (at your option) any later version. |
343 def test_text_tag_hash_all_number | 343 def test_text_tag_hash_all_number |
344 c = Changeset.new(:scmid => '0123456789', :revision => '0123456789') | 344 c = Changeset.new(:scmid => '0123456789', :revision => '0123456789') |
345 assert_equal 'commit:0123456789', c.text_tag | 345 assert_equal 'commit:0123456789', c.text_tag |
346 end | 346 end |
347 | 347 |
348 def test_text_tag_hash_with_repository_identifier | |
349 r = Repository::Subversion.new( | |
350 :project_id => 1, | |
351 :url => 'svn://localhost/test', | |
352 :identifier => 'documents') | |
353 c = Changeset.new(:revision => '7234cb27', :scmid => '7234cb27', :repository => r) | |
354 assert_equal 'commit:documents|7234cb27', c.text_tag | |
355 assert_equal 'ecookbook:commit:documents|7234cb27', c.text_tag(Project.find(2)) | |
356 end | |
357 | |
348 def test_previous | 358 def test_previous |
349 changeset = Changeset.find_by_revision('3') | 359 changeset = Changeset.find_by_revision('3') |
350 assert_equal Changeset.find_by_revision('2'), changeset.previous | 360 assert_equal Changeset.find_by_revision('2'), changeset.previous |
351 end | 361 end |
352 | 362 |