summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_git_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-17 14:28:08 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-17 14:28:08 +0000
commit421db739c513a492e8018d792483f9352a6d84df (patch)
tree6e1efda21238552f8754a7a40f72f3ff9c1c2822 /test/unit/repository_git_test.rb
parentff65babd1c38c5a737738503a4b9f49da6e48911 (diff)
downloadredmine-421db739c513a492e8018d792483f9352a6d84df.tar.gz
redmine-421db739c513a492e8018d792483f9352a6d84df.zip
scm: git: replace "write_attribute" at unit model test for database order consistency (#5357)
On Rails 3.0.11, "NoMethodError: private method `write_attribute'" error raises. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8899 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_git_test.rb')
-rw-r--r--test/unit/repository_git_test.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb
index 6cfd3c65a..4730465b8 100644
--- a/test/unit/repository_git_test.rb
+++ b/test/unit/repository_git_test.rb
@@ -211,9 +211,12 @@ class RepositoryGitTest < ActiveSupport::TestCase
@project.reload
assert_equal NUM_REV, @repository.changesets.count
assert_not_nil @repository.extra_info
- @repository.write_attribute(:extra_info, nil)
+ h = {}
+ h["heads"] = []
+ h["branches"] = {}
+ h["db_consistent"] = {}
+ @repository.merge_extra_info(h)
@repository.save
- assert_nil @repository.extra_info
assert_equal NUM_REV, @repository.changesets.count
@repository.fetch_changesets
@project.reload