summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-12-03 14:29:51 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-12-03 14:29:51 +0100
commit239a4f72642b2df0cc057a17daadf1391332d118 (patch)
treed88b8cd131d056f38bad3188487ac0ef63d9044c /spec/models
parente9abacedb01efdb127580dae54a6ffbe8c8c1399 (diff)
downloadgitlab-ce-239a4f72642b2df0cc057a17daadf1391332d118.tar.gz
Use plaintext token when migration is not complete
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/concerns/token_authenticatable_strategies/encrypted_spec.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/spec/models/concerns/token_authenticatable_strategies/encrypted_spec.rb b/spec/models/concerns/token_authenticatable_strategies/encrypted_spec.rb
index f1e5810fa6a..93cab80cb1f 100644
--- a/spec/models/concerns/token_authenticatable_strategies/encrypted_spec.rb
+++ b/spec/models/concerns/token_authenticatable_strategies/encrypted_spec.rb
@@ -66,26 +66,9 @@ describe TokenAuthenticatableStrategies::Encrypted do
.with('some_field' => 'my-value')
.and_return(nil)
- allow(model).to receive(:find_by)
- .with('some_field_encrypted' => encrypted)
- .and_return(nil)
-
expect(subject.find_token_authenticatable('my-value'))
.to be_nil
end
-
- it 'finds by encrypted value if cleartext is not present' do
- allow(model).to receive(:find_by)
- .with('some_field' => 'my-value')
- .and_return(nil)
-
- allow(model).to receive(:find_by)
- .with('some_field_encrypted' => encrypted)
- .and_return('encrypted resource')
-
- expect(subject.find_token_authenticatable('my-value'))
- .to eq 'encrypted resource'
- end
end
end