diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-30 15:04:08 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-30 15:04:08 -0500 |
commit | c353794dff580c8aa63b357b2857c1fadff3104b (patch) | |
tree | b57794919c8eabd9d928b44a15342784f4b4215b /activerecord/test/cases | |
parent | 5cef8bcc549bf714c1c73e658fd96d5fea0fab84 (diff) | |
download | rails-c353794dff580c8aa63b357b2857c1fadff3104b.tar.gz rails-c353794dff580c8aa63b357b2857c1fadff3104b.tar.bz2 rails-c353794dff580c8aa63b357b2857c1fadff3104b.zip |
Fixed that pessimistic locking you reference the quoted table name (Josh Susser) [#67 state:resolved]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/locking_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb index e80f902d0d..7db6c570b5 100644 --- a/activerecord/test/cases/locking_test.rb +++ b/activerecord/test/cases/locking_test.rb @@ -2,6 +2,7 @@ require "cases/helper" require 'models/person' require 'models/reader' require 'models/legacy_thing' +require 'models/reference' class LockWithoutDefault < ActiveRecord::Base; end @@ -15,7 +16,7 @@ class ReadonlyFirstNamePerson < Person end class OptimisticLockingTest < ActiveRecord::TestCase - fixtures :people, :legacy_things + fixtures :people, :legacy_things, :references # need to disable transactional fixtures, because otherwise the sqlite3 # adapter (at least) chokes when we try and change the schema in the middle @@ -138,6 +139,12 @@ class OptimisticLockingTest < ActiveRecord::TestCase end end end + + def test_quote_table_name + ref = references(:michael_magician) + ref.favourite = !ref.favourite + assert ref.save + end private |