Sha256: 370d87730ae0cfa35742de564a1ce22d68605e320e896639cfd666c0e433f5a2

Contents?: true

Size: 491 Bytes

Versions: 2

Compression:

Stored size: 491 Bytes

Contents

require 'spec_helper'

describe(OmniAuth::Identity::Models::MongoMapper, :db => true) do
  class MongoMapperTestIdentity
    include MongoMapper::Document
    include OmniAuth::Identity::Models::MongoMapper
    auth_key :ham_sandwich
  end

  it 'should locate using the auth key using a where query' do
    MongoMapperTestIdentity.should_receive(:where).with('ham_sandwich' => 'open faced').and_return(['wakka'])
    MongoMapperTestIdentity.locate('open faced').should == 'wakka'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
omniauth-identity-1.1.0 spec/omniauth/identity/models/mongo_mapper_spec.rb
omniauth-identity-1.0.0 spec/omniauth/identity/models/mongo_mapper_spec.rb