omniauth-identity 3.0.3 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'couch_potato'
4
-
5
- class CouchPotatoTestIdentity
6
- include CouchPotato::Persistence
7
- include OmniAuth::Identity::Models::CouchPotatoModule
8
- auth_key :ham_sandwich
9
- end
10
-
11
- RSpec.describe(OmniAuth::Identity::Models::CouchPotatoModule, db: true) do
12
- describe 'model', type: :model do
13
- subject { CouchPotatoTestIdentity }
14
-
15
- it 'delegates locate to the where query method' do
16
- allow(subject).to receive(:where).with('ham_sandwich' => 'open faced',
17
- 'category' => 'sandwiches').and_return(['wakka'])
18
- expect(subject.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches')).to eq('wakka')
19
- end
20
- end
21
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mongoid'
4
-
5
- class MongoidTestIdentity
6
- include Mongoid::Document
7
- include OmniAuth::Identity::Models::Mongoid
8
- auth_key :ham_sandwich
9
- store_in database: 'db1', collection: 'mongoid_test_identities', client: 'secondary'
10
- end
11
-
12
- RSpec.describe(OmniAuth::Identity::Models::Mongoid, db: true) do
13
- describe 'model', type: :model do
14
- subject { MongoidTestIdentity }
15
-
16
- it { is_expected.to be_mongoid_document }
17
-
18
- it 'does not munge collection name' do
19
- expect(subject).to be_stored_in(database: 'db1', collection: 'mongoid_test_identities', client: 'secondary')
20
- end
21
-
22
- it 'delegates locate to the where query method' do
23
- allow(subject).to receive(:where).with('ham_sandwich' => 'open faced',
24
- 'category' => 'sandwiches').and_return(['wakka'])
25
- expect(subject.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches')).to eq('wakka')
26
- end
27
- end
28
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'nobrainer'
4
-
5
- class NobrainerTestIdentity
6
- include NoBrainer::Document
7
- include OmniAuth::Identity::Models::NoBrainer
8
- auth_key :ham_sandwich
9
- end
10
-
11
- RSpec.describe(OmniAuth::Identity::Models::NoBrainer, db: true) do
12
- it 'delegates locate to the where query method' do
13
- allow(NobrainerTestIdentity).to receive(:where).with('ham_sandwich' => 'open faced',
14
- 'category' => 'sandwiches').and_return(['wakka'])
15
- expect(NobrainerTestIdentity.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches')).to eq('wakka')
16
- end
17
- end