Sha256: b0ef6719011f6fc3369d60ce1b619599f7c0889b92db6ba92006a2dcb10b241a

Contents?: true

Size: 662 Bytes

Versions: 2

Compression:

Stored size: 662 Bytes

Contents

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

  describe 'model', type: :model do
    subject { CouchPotatoTestIdentity }

    it 'delegates locate to the where query method' do
      allow(subject).to receive(:where).with('ham_sandwich' => 'open faced',
                                             'category' => 'sandwiches').and_return(['wakka'])
      expect(subject.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches')).to eq('wakka')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
omniauth-identity-3.0.1 spec/omniauth/identity/models/couch_potato_spec.rb
omniauth-identity-3.0.0 spec/omniauth/identity/models/couch_potato_spec.rb