summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_git_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-04 16:40:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-04 16:40:24 +0000
commit46044b48a3d7f27a2ca27fadc5e1b067f5d53d96 (patch)
tree37e253c10d15e051a5c58525d534fa234f508f34 /test/unit/repository_git_test.rb
parent0f2026821ccbf09b6df07e5f0da349537e3d6d62 (diff)
downloadredmine-46044b48a3d7f27a2ca27fadc5e1b067f5d53d96.tar.gz
redmine-46044b48a3d7f27a2ca27fadc5e1b067f5d53d96.zip
Adds accessors for report_last_commit.
git-svn-id: http://svn.redmine.org/redmine/trunk@15885 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_git_test.rb')
-rw-r--r--test/unit/repository_git_test.rb17
1 files changed, 4 insertions, 13 deletions
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb
index 15b7ea53b..7b56b4a79 100644
--- a/test/unit/repository_git_test.rb
+++ b/test/unit/repository_git_test.rb
@@ -243,22 +243,13 @@ class RepositoryGitTest < ActiveSupport::TestCase
assert_equal h1, h2
end
- def test_keep_extra_report_last_commit_in_clear_changesets
+ def test_clear_changesets_should_keep_report_last_commit
assert_nil @repository.extra_info
- h = {}
- h["extra_report_last_commit"] = "1"
- @repository.merge_extra_info(h)
+ @repository.report_last_commit = "1"
@repository.save
- @project.reload
-
- assert_equal 0, @repository.changesets.count
- @repository.fetch_changesets
- @project.reload
-
- assert_equal NUM_REV, @repository.changesets.count
@repository.send(:clear_changesets)
- assert_equal 1, @repository.extra_info.size
- assert_equal "1", @repository.extra_info["extra_report_last_commit"]
+
+ assert_equal true, @repository.report_last_commit
end
def test_refetch_after_clear_changesets