diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2019-02-20 14:39:37 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-02-20 14:39:37 +0300 |
commit | 6d92a3d4e232d4137f66773c82f01c32d7474a21 (patch) | |
tree | b3fda377c51504a6d21da1742cac3de7fd668ef0 /spec/lib | |
parent | 83a23297bdeb5086ecc96d86b2e264dd3591022d (diff) |
Remove undigested token column from personal_access_tokens table
Token column are no longer used as token values are stored digested in
token_digest.
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/background_migration/digest_column_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/background_migration/digest_column_spec.rb b/spec/lib/gitlab/background_migration/digest_column_spec.rb index 3e107ac3027..a25dcb06005 100644 --- a/spec/lib/gitlab/background_migration/digest_column_spec.rb +++ b/spec/lib/gitlab/background_migration/digest_column_spec.rb @@ -22,7 +22,7 @@ describe Gitlab::BackgroundMigration::DigestColumn, :migration, schema: 20180913 it 'erases token' do expect { subject.perform(PersonalAccessToken, :token, :token_digest, 1, 2) }.to( - change { PersonalAccessToken.find(1).token }.from('token-01').to(nil)) + change { PersonalAccessToken.find(1).read_attribute(:token) }.from('token-01').to(nil)) end end @@ -39,7 +39,7 @@ describe Gitlab::BackgroundMigration::DigestColumn, :migration, schema: 20180913 it 'leaves token empty' do expect { subject.perform(PersonalAccessToken, :token, :token_digest, 1, 2) }.not_to( - change { PersonalAccessToken.find(1).token }.from(nil)) + change { PersonalAccessToken.find(1).read_attribute(:token) }.from(nil)) end end end |