Sha256: f3fd958ce0f6acf0f6697010e9d81d9db08649e37e968a5b62f5930e462146ac

Contents?: true

Size: 577 Bytes

Versions: 1

Compression:

Stored size: 577 Bytes

Contents

require 'spec_helper'

describe(OmniAuth::Identity::Models::CouchPotatoModule, :db => true) do
  class CouchPotatoTestIdentity
    include CouchPotato::Persistence
    include OmniAuth::Identity::Models::CouchPotatoModule
    auth_key :ham_sandwich
  end

  it 'should delegate locate to the where query method' do
    CouchPotatoTestIdentity.should_receive(:where).with('ham_sandwich' => 'open faced', 'category' => 'sandwiches').and_return(['wakka'])
    CouchPotatoTestIdentity.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches').should == 'wakka'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-identity-1.1.1 spec/omniauth/identity/models/couch_potato_spec.rb