Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2017-11-17 17:24:25 +0300
committerDouwe Maan <douwe@gitlab.com>2017-11-17 17:24:25 +0300
commitc7cf68bd6ff744e044944acad586e06badc481d4 (patch)
tree6cf6af687696012525b6cb05b336bec13f049a10 /spec/models/identity_spec.rb
parent76b2a7caa5219662a29f0eb16f0507aac1976f33 (diff)
Changing OAuth lookup to be case insensitive
Diffstat (limited to 'spec/models/identity_spec.rb')
-rw-r--r--spec/models/identity_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/identity_spec.rb b/spec/models/identity_spec.rb
index 3ed048744de..a45a6088831 100644
--- a/spec/models/identity_spec.rb
+++ b/spec/models/identity_spec.rb
@@ -33,5 +33,15 @@ describe Identity do
expect(identity).to eq(ldap_identity)
end
end
+
+ context 'any other provider' do
+ let!(:test_entity) { create(:identity, provider: 'test_provider', extern_uid: 'test_uid') }
+
+ it 'the extern_uid lookup is case insensitive' do
+ identity = described_class.with_extern_uid('test_provider', 'TEST_UID').first
+
+ expect(identity).to eq(test_entity)
+ end
+ end
end
end