Commit 36811152 authored by Mayra Cabrera's avatar Mayra Cabrera

Increases specs examples regarding projects & deploy tokens

parent 365dd5a6
...@@ -3996,7 +3996,7 @@ describe Project do ...@@ -3996,7 +3996,7 @@ describe Project do
it { is_expected.to be_nil } it { is_expected.to be_nil }
end 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]) } let!(:deploy_token) { create(:deploy_token, :gitlab_deploy_token, :expired, projects: [project]) }
it { is_expected.to be_nil } it { is_expected.to be_nil }
...@@ -4007,5 +4007,12 @@ describe Project do ...@@ -4007,5 +4007,12 @@ describe Project do
it { is_expected.to be_nil } it { is_expected.to be_nil }
end 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
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment