diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2017-06-29 17:14:12 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-06-29 17:14:12 +0300 |
commit | a3d7983b18cc81607c255f64b678da0ab7b9477d (patch) | |
tree | 273b1109d9e3b1061c2251ebcd567e7aca0d9405 /spec/models/concerns | |
parent | da6a3fb0c24e2af59d6fbd3421446b8f7666cdf6 (diff) |
Revert "Merge branch 'dm-drop-default-scope-on-sortable-finders' into 'master'"
This reverts commit b07c00032b038f40796a28e34b6dd4c622bad012, reversing
changes made to 2b97d76d0b08a778710410df910a7601f6b8e9e7.
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/sortable_spec.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/models/concerns/sortable_spec.rb b/spec/models/concerns/sortable_spec.rb deleted file mode 100644 index d1e17c4f684..00000000000 --- a/spec/models/concerns/sortable_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'spec_helper' - -describe Sortable do - let(:relation) { Issue.all } - - describe '#where' do - it 'orders by id, descending' do - order_node = relation.where(iid: 1).order_values.first - expect(order_node).to be_a(Arel::Nodes::Descending) - expect(order_node.expr.name).to eq(:id) - end - end - - describe '#find_by' do - it 'does not order' do - expect(relation).to receive(:unscope).with(:order).and_call_original - - relation.find_by(iid: 1) - end - end -end |