diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-27 20:03:46 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-27 20:03:46 -0300 |
commit | 6b67df70ab1bc42d9a05571144cdf5614a7d4a6a (patch) | |
tree | dfc105d13590e6d5b50d6fc689e18f77d7a750c2 /activerecord/test | |
parent | f2c0725d79e29b02e30e7a4827851acc4a766730 (diff) | |
download | rails-6b67df70ab1bc42d9a05571144cdf5614a7d4a6a.tar.gz rails-6b67df70ab1bc42d9a05571144cdf5614a7d4a6a.tar.bz2 rails-6b67df70ab1bc42d9a05571144cdf5614a7d4a6a.zip |
Revert "Revert "Add readonly support for relations.""
This reverts commit f2c0725d79e29b02e30e7a4827851acc4a766730.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 6a39aa6e40..655eb3314d 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -79,5 +79,11 @@ class RelationTest < ActiveRecord::TestCase assert relation.respond_to?(method) end end + + def test_find_with_readonly_option + Developer.all.each { |d| assert !d.readonly? } + Developer.all.readonly.each { |d| assert d.readonly? } + Developer.all(:readonly => true).each { |d| assert d.readonly? } + end end |