spec/unit/resource_controller/collection_spec.rb in activeadmin-0.4.0 vs spec/unit/resource_controller/collection_spec.rb in activeadmin-0.4.1
- old
+ new
@@ -24,10 +24,10 @@
describe ActiveAdmin::ResourceController::Collection::Sorting do
let(:params){ {:order => "id_asc" }}
it "should prepend the table name" do
chain = mock("ChainObj")
- chain.should_receive(:order).with("\"posts\".id asc").once.and_return(Post.search)
+ chain.should_receive(:order).with("\"posts\".\"id\" asc").once.and_return(Post.search)
controller.send :sort_order, chain
end
end
end