diff options
| author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2015-12-23 09:29:04 +0100 |
|---|---|---|
| committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2015-12-23 09:37:01 +0100 |
| commit | 76f7e80455f1f5b5b052c7d8caf519713b016eea (patch) | |
| tree | 2d2039982ce4727a8966c4a4984c84012b830e60 /spec/models/concerns | |
| parent | 3b61dc47ec377b857b66f9b2a81a183276163f4e (diff) | |
| download | gitlab-ce-76f7e80455f1f5b5b052c7d8caf519713b016eea.tar.gz | |
Fix method that ensures authentication token
Until now, `ensure_#{token_filed_name}` method didn't persist new token in database.
This closes #4235.
Diffstat (limited to 'spec/models/concerns')
| -rw-r--r-- | spec/models/concerns/token_authenticatable_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/concerns/token_authenticatable_spec.rb b/spec/models/concerns/token_authenticatable_spec.rb index a9b0b64e5de..07ec3a80e60 100644 --- a/spec/models/concerns/token_authenticatable_spec.rb +++ b/spec/models/concerns/token_authenticatable_spec.rb @@ -35,6 +35,10 @@ describe ApplicationSetting, 'TokenAuthenticatable' do it { is_expected.to be_a String } it { is_expected.to_not be_blank } + + it 'should persist new token' do + expect(subject).to eq described_class.current[token_field] + end end end |
