Sha256: c8b238418125ca1be609254b2f06cf146db428d3d058460b4244150b3ebf7b43
Contents?: true
Size: 707 Bytes
Versions: 4
Compression:
Stored size: 707 Bytes
Contents
# frozen_string_literal: true require 'couch_potato' class CouchPotatoTestIdentity include CouchPotato::Persistence include OmniAuth::Identity::Models::CouchPotatoModule auth_key :ham_sandwich end RSpec.describe(OmniAuth::Identity::Models::CouchPotatoModule, db: true) do 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
4 entries across 4 versions & 1 rubygems