diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-10-29 18:40:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-10-29 18:40:49 +0000 |
commit | 68160b34854f6b886b3cf9fe3045af1d18128747 (patch) | |
tree | 873cc3c0e6d96c7f94f023385c823df237a9e79e /activerecord/test/readonly_test.rb | |
parent | 14b60fc074d8a97379561003281df70053225e01 (diff) | |
download | rails-68160b34854f6b886b3cf9fe3045af1d18128747.tar.gz rails-68160b34854f6b886b3cf9fe3045af1d18128747.tar.bz2 rails-68160b34854f6b886b3cf9fe3045af1d18128747.zip |
Added migration support for Oracle (closes #2647) [Michael Schoen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/readonly_test.rb')
-rwxr-xr-x | activerecord/test/readonly_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/activerecord/test/readonly_test.rb b/activerecord/test/readonly_test.rb index d621432596..f8acc16493 100755 --- a/activerecord/test/readonly_test.rb +++ b/activerecord/test/readonly_test.rb @@ -77,10 +77,14 @@ class ReadOnlyTest < Test::Unit::TestCase assert !Post.find(1, :readonly => false).readonly? end - Post.constrain(:joins => ', developers') do - assert Post.find(1).readonly? - assert Post.find(1, :readonly => true).readonly? - assert !Post.find(1, :readonly => false).readonly? + # Oracle barfs on this because the join includes unqualified and + # conflicting column names + unless current_adapter?(:OCIAdapter) + Post.constrain(:joins => ', developers') do + assert Post.find(1).readonly? + assert Post.find(1, :readonly => true).readonly? + assert !Post.find(1, :readonly => false).readonly? + end end Post.constrain(:readonly => true) do |