mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
some test renaming to avoid collisions, and some annoying issues between dbs
This commit is contained in:
@@ -492,7 +492,7 @@ class PersistencesTest < ActiveRecord::TestCase
|
||||
end
|
||||
|
||||
def test_update_attributes_as_admin
|
||||
person = TightPerson.create
|
||||
person = TightPerson.create({ "first_name" => 'Joshua' })
|
||||
person.update_attributes({ "first_name" => 'Josh', "gender" => 'm', "comments" => 'from NZ' }, :as => :admin)
|
||||
person.reload
|
||||
|
||||
@@ -501,8 +501,8 @@ class PersistencesTest < ActiveRecord::TestCase
|
||||
assert_equal 'from NZ', person.comments
|
||||
end
|
||||
|
||||
def test_update_attributes_as_without_protection
|
||||
person = TightPerson.create
|
||||
def test_update_attributes_without_protection
|
||||
person = TightPerson.create({ "first_name" => 'Joshua' })
|
||||
person.update_attributes({ "first_name" => 'Josh', "gender" => 'm', "comments" => 'from NZ' }, :without_protection => true)
|
||||
person.reload
|
||||
|
||||
@@ -532,8 +532,8 @@ class PersistencesTest < ActiveRecord::TestCase
|
||||
Reply.reset_callbacks(:validate)
|
||||
end
|
||||
|
||||
def test_update_attributes_as_admin
|
||||
person = TightPerson.create
|
||||
def test_update_attributes_with_bang_as_admin
|
||||
person = TightPerson.create({ "first_name" => 'Joshua' })
|
||||
person.update_attributes!({ "first_name" => 'Josh', "gender" => 'm', "comments" => 'from NZ' }, :as => :admin)
|
||||
person.reload
|
||||
|
||||
@@ -542,8 +542,8 @@ class PersistencesTest < ActiveRecord::TestCase
|
||||
assert_equal 'from NZ', person.comments
|
||||
end
|
||||
|
||||
def test_update_attributes_as_without_protection
|
||||
person = TightPerson.create
|
||||
def test_update_attributestes_with_bang_without_protection
|
||||
person = TightPerson.create({ "first_name" => 'Joshua' })
|
||||
person.update_attributes!({ "first_name" => 'Josh', "gender" => 'm', "comments" => 'from NZ' }, :without_protection => true)
|
||||
person.reload
|
||||
|
||||
|
||||
Reference in New Issue
Block a user