Sha256: 6aacfe5225085928734dd49ce4b37958070c5201a65875ddcc0c70a52f2a92c8

Contents?: true

Size: 630 Bytes

Versions: 4

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

require 'nobrainer'

class NobrainerTestIdentity
  include NoBrainer::Document
  include OmniAuth::Identity::Models::NoBrainer
  auth_key :ham_sandwich
end

RSpec.describe(OmniAuth::Identity::Models::NoBrainer, db: true) do
  it 'delegates locate to the where query method' do
    allow(NobrainerTestIdentity).to receive(:where).with('ham_sandwich' => 'open faced',
                                                         'category' => 'sandwiches').and_return(['wakka'])
    expect(NobrainerTestIdentity.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches')).to eq('wakka')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omniauth-identity-3.0.6 spec/omniauth/identity/models/no_brainer_spec.rb
omniauth-identity-3.0.5 spec/omniauth/identity/models/no_brainer_spec.rb
omniauth-identity-3.0.4 spec/omniauth/identity/models/no_brainer_spec.rb
omniauth-identity-3.0.3 spec/omniauth/identity/models/no_brainer_spec.rb