Commit 712483e8 authored by tmaruyama's avatar tmaruyama

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: https://svn.redmine.org/redmine/trunk@8899 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1ffcf7bc
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment