Sha256: 55d8264e830696c76b5306da99e86794ffb4a752034ed2f25e8fc480375890a6
Contents?: true
Size: 921 Bytes
Versions: 1
Compression:
Stored size: 921 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper") describe "Searchlogic::ActiveRecord::AssociationProxy" do it "should call location conditions" do company = Company.create user = company.users.create(:username => "bjohnson") company.users.send(:username_like, "bjohnson").should == [user] end it "should call ordering conditions" do company = Company.create user = company.users.create(:username => "bjohnson") company.users.send(:ascend_by_username).should == [user] end it "should call 'or' conditions" do company = Company.create user = company.users.create(:username => "bjohnson") company.users.send(:username_or_some_type_id_like, "bjohnson").should == [user] end it "should ignore belongs_to associations" do user = User.create(:male => true) cart = user.carts.create cart.user.send("male").should == true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
searchlogic-2.4.28 | spec/searchlogic/active_record/association_proxy_spec.rb |