diff options
author | Nick Ragaz <nick.ragaz@gmail.com> | 2010-09-02 00:36:18 -0400 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-09-05 08:27:51 -0300 |
commit | 16e078d908b79c78016e3a08afdd18a3dc77d40b (patch) | |
tree | 19f7bcecc5dc4407dbaa08b3aa670a0765ba8f5a /activerecord/test/cases | |
parent | 91fec0d24d50d3b3e90c48b2501ca913544781cc (diff) | |
download | rails-16e078d908b79c78016e3a08afdd18a3dc77d40b.tar.gz rails-16e078d908b79c78016e3a08afdd18a3dc77d40b.tar.bz2 rails-16e078d908b79c78016e3a08afdd18a3dc77d40b.zip |
failing test for reorder overriding default_scope
[5528]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relation_scoping_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_scoping_test.rb b/activerecord/test/cases/relation_scoping_test.rb index e27bb65144..f538d2a326 100644 --- a/activerecord/test/cases/relation_scoping_test.rb +++ b/activerecord/test/cases/relation_scoping_test.rb @@ -390,6 +390,12 @@ class DefaultScopingTest < ActiveRecord::TestCase assert_equal expected, received end + def test_reordered_scope_overrides_default_scope_order + not_expected = DeveloperOrderedBySalary.first # Jamis -> name DESC + received = DeveloperOrderedBySalary.reordered_by_name.first # David -> name + assert not_expected.id != received.id + end + def test_nested_exclusive_scope expected = Developer.find(:all, :limit => 100).collect { |dev| dev.salary } received = DeveloperOrderedBySalary.send(:with_exclusive_scope, :find => { :limit => 100 }) do |