diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-07-23 09:23:08 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-07-23 09:23:08 +0000 |
commit | f2c46672cae763bb213e8aa14253e5eea48c1064 (patch) | |
tree | 708ab3375268f826b01adb2ae79e590bcb9aabd1 /spec/models/deploy_token_spec.rb | |
parent | d1f890e9e4c759b1b43b888c07127a05e38f53e5 (diff) | |
download | gitlab-ce-f2c46672cae763bb213e8aa14253e5eea48c1064.tar.gz |
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.rb | 9 |
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 |