summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-23 09:23:46 -0500
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-23 09:23:46 -0500
commit82d66ac96d03a4caf6d4c3c86c51009e2a4fe9fb (patch)
tree38b898c88c1e2153d519267cb3dc04e84889123e /spec/models
parentcdac54e2a2abe4b93bd5a96603b9d6d8745d277e (diff)
downloadgitlab-ce-82d66ac96d03a4caf6d4c3c86c51009e2a4fe9fb.tar.gz
Increases specs examples regarding projects & deploy tokens
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index bae2f1342d3..df31550044d 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -3606,7 +3606,7 @@ describe Project do
it { is_expected.to be_nil }
end
- context 'when there is a gitlab deploy token associated but it has expired' do
+ context 'when there is a gitlab deploy token associated but it is expired' do
let!(:deploy_token) { create(:deploy_token, :gitlab_deploy_token, :expired, projects: [project]) }
it { is_expected.to be_nil }
@@ -3617,5 +3617,12 @@ describe Project do
it { is_expected.to be_nil }
end
+
+ context 'when there is a deploy token associated to a different project' do
+ let(:project_2) { create(:project) }
+ let!(:deploy_token) { create(:deploy_token, projects: [project_2]) }
+
+ it { is_expected.to be_nil }
+ end
end
end