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:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-08-02 20:43:36 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-08-02 20:43:36 +0300
commita6268d302379258b1a2bf50f7db87b40e84ffe94 (patch)
tree2af5bd8ff3e095310a3745451ce7d1547d81f6e4 /spec/models
parent367e7520b08b1b731d5298fe700fc39f356017ce (diff)
Fix deploy tokens without `expire_at` crashes
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/deploy_token_spec.rb8
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