Sha256: 39deb26b9e85ea2e2f6040af43984340338291d08f13acfacbb1b436a710858f
Contents?: true
Size: 611 Bytes
Versions: 4
Compression:
Stored size: 611 Bytes
Contents
require 'spec_helper' describe(OmniAuth::Identity::Models::Mongoid, :db => true) do class MongoidTestIdentity include Mongoid::Document include OmniAuth::Identity::Models::Mongoid auth_key :ham_sandwich end it 'should locate using the auth key using a where query' do MongoidTestIdentity.should_receive(:where).with('ham_sandwich' => 'open faced').and_return(['wakka']) MongoidTestIdentity.locate('open faced').should == 'wakka' end it 'should not use STI rules for its collection name' do MongoidTestIdentity.collection.name.should == 'mongoid_test_identities' end end
Version data entries
4 entries across 4 versions & 1 rubygems