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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-07-23 12:23:08 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-07-23 12:23:08 +0300
commitf2c46672cae763bb213e8aa14253e5eea48c1064 (patch)
tree708ab3375268f826b01adb2ae79e590bcb9aabd1 /spec/models/deploy_token_spec.rb
parentd1f890e9e4c759b1b43b888c07127a05e38f53e5 (diff)
Resolve "Deploy Tokens failed to clone LFS repository"
Diffstat (limited to 'spec/models/deploy_token_spec.rb')
-rw-r--r--spec/models/deploy_token_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/models/deploy_token_spec.rb b/spec/models/deploy_token_spec.rb
index f8d51a95833..cd84a684fec 100644
--- a/spec/models/deploy_token_spec.rb
+++ b/spec/models/deploy_token_spec.rb
@@ -62,11 +62,18 @@ describe DeployToken do
end
end
- context "when it hasn't been revoked" do
+ context "when it hasn't been revoked and is not expired" do
it 'should return true' do
expect(deploy_token.active?).to be_truthy
end
end
+
+ context "when it hasn't been revoked and is expired" do
+ it 'should return true' do
+ deploy_token.update_attribute(:expires_at, Date.today - 5.days)
+ expect(deploy_token.active?).to be_falsy
+ end
+ end
end
describe '#username' do