Sha256: 7c266e6010716f511c6db1217c7d0ac41fa3f5b78938b877e7d80cc6f9c5ce5c
Contents?: true
Size: 981 Bytes
Versions: 8
Compression:
Stored size: 981 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") describe "Association Ordering" do it "should allow ascending" do Company.ascend_by_users_username.proxy_options.should == User.ascend_by_username.proxy_options.merge(:joins => :users) end it "should allow descending" do Company.descend_by_users_username.proxy_options.should == User.descend_by_username.proxy_options.merge(:joins => :users) end it "should allow deep ascending" do Company.ascend_by_users_orders_total.proxy_options.should == Order.ascend_by_total.proxy_options.merge(:joins => {:users => :orders}) end it "should allow deep descending" do Company.descend_by_users_orders_total.proxy_options.should == Order.descend_by_total.proxy_options.merge(:joins => {:users => :orders}) end it "should ascend with a belongs to" do User.ascend_by_company_name.proxy_options.should == Company.ascend_by_name.proxy_options.merge(:joins => :company) end end
Version data entries
8 entries across 8 versions & 2 rubygems