diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-08-02 19:43:36 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-08-02 19:43:36 +0200 |
commit | a6268d302379258b1a2bf50f7db87b40e84ffe94 (patch) | |
tree | 2af5bd8ff3e095310a3745451ce7d1547d81f6e4 /spec/models/deploy_token_spec.rb | |
parent | 367e7520b08b1b731d5298fe700fc39f356017ce (diff) | |
download | gitlab-ce-a6268d302379258b1a2bf50f7db87b40e84ffe94.tar.gz |
Fix deploy tokens without `expire_at` crashes
Diffstat (limited to 'spec/models/deploy_token_spec.rb')
-rw-r--r-- | spec/models/deploy_token_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/deploy_token_spec.rb b/spec/models/deploy_token_spec.rb index cd84a684fec..3435f93c999 100644 --- a/spec/models/deploy_token_spec.rb +++ b/spec/models/deploy_token_spec.rb @@ -74,6 +74,14 @@ describe DeployToken do expect(deploy_token.active?).to be_falsy end end + + context "when it hasn't been revoked and has no expiry" do + let(:deploy_token) { create(:deploy_token, expires_at: nil) } + + it 'should return true' do + expect(deploy_token.active?).to be_truthy + end + end end describe '#username' do |