Commit 078a1507 authored by marutosijp's avatar marutosijp

Rails4: replace deprecated Relation#update_all at RepositoryTest

git-svn-id: https://svn.redmine.org/redmine/trunk@12557 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 309099e1
......@@ -136,14 +136,12 @@ class RepositoryTest < ActiveSupport::TestCase
end
def test_identifier_should_not_be_frozen_for_a_saved_repository_with_blank_identifier
Repository.update_all(["identifier = ''"], "id = 10")
Repository.where(:id => 10).update_all(["identifier = ''"])
assert_equal false, Repository.find(10).identifier_frozen?
end
def test_identifier_should_be_frozen_for_a_saved_repository_with_valid_identifier
Repository.update_all(["identifier = 'abc123'"], "id = 10")
Repository.where(:id => 10).update_all(["identifier = 'abc123'"])
assert_equal true, Repository.find(10).identifier_frozen?
end
......
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