aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/persistence_test.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-04-27 00:28:00 +0200
committerJosh Kalderimis <josh.kalderimis@gmail.com>2011-04-27 00:28:24 +0200
commitfee69cb02150d3ce4c94b4b47751fd8959a7bf13 (patch)
tree837f97dc557784117bdaaefdad34620602471830 /activerecord/test/cases/persistence_test.rb
parent344c7766a5e9e8e360cdcbb581caa146aaf69a67 (diff)
downloadrails-fee69cb02150d3ce4c94b4b47751fd8959a7bf13.tar.gz
rails-fee69cb02150d3ce4c94b4b47751fd8959a7bf13.tar.bz2
rails-fee69cb02150d3ce4c94b4b47751fd8959a7bf13.zip
fix mass-assignment security tests, this was due to a string column limit which doesn't cause issues on sqlite
Diffstat (limited to 'activerecord/test/cases/persistence_test.rb')
-rw-r--r--activerecord/test/cases/persistence_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb
index 2044bc6e3f..7891ccfeef 100644
--- a/activerecord/test/cases/persistence_test.rb
+++ b/activerecord/test/cases/persistence_test.rb
@@ -493,21 +493,21 @@ class PersistencesTest < ActiveRecord::TestCase
def test_update_attributes_as_admin
person = TightPerson.create
- person.update_attributes({ "first_name" => 'Josh', "gender" => 'male', "comments" => 'from NZ' }, :as => :admin)
+ person.update_attributes({ "first_name" => 'Josh', "gender" => 'm', "comments" => 'from NZ' }, :as => :admin)
person.reload
- assert_equal 'Josh', person.first_name
- assert_equal 'male', person.gender
+ assert_equal 'Josh', person.first_name
+ assert_equal 'm', person.gender
assert_equal 'from NZ', person.comments
end
def test_update_attributes_as_without_protection
person = TightPerson.create
- person.update_attributes({ "first_name" => 'Josh', "gender" => 'male', "comments" => 'from NZ' }, :without_protection => true)
+ person.update_attributes({ "first_name" => 'Josh', "gender" => 'm', "comments" => 'from NZ' }, :without_protection => true)
person.reload
- assert_equal 'Josh', person.first_name
- assert_equal 'male', person.gender
+ assert_equal 'Josh', person.first_name
+ assert_equal 'm', person.gender
assert_equal 'from NZ', person.comments
end