Sha256: 0223a267333f44052da2f4b498b3a26775202cd420087d8c511b1aef4429b50a

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

require 'spec_helper'

describe(OmniAuth::Identity::Models::DataMapper, :db => true) do
  class DataMapperTestIdentity
    include DataMapper::Resource
    include OmniAuth::Identity::Models::DataMapper

    property :id,              Serial
    auth_key :ham_sandwich
  end

  DataMapper.finalize

  before :all do
    @resource = DataMapperTestIdentity.new
  end

  it 'should delegate locate to the all query method' do
    DataMapperTestIdentity.should_receive(:all).with('ham_sandwich' => 'open faced', 'category' => 'sandwiches').and_return(['wakka'])
    DataMapperTestIdentity.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/data_mapper_spec.rb