Improve specs
This commit is contained in:
parent
630b666c8f
commit
29a64950dd
2 changed files with 5 additions and 4 deletions
|
@ -724,6 +724,7 @@ describe MergeRequest, models: true do
|
|||
fork_project.create_forked_project_link(forked_to_project_id: fork_project.id, forked_from_project_id: project.id)
|
||||
end
|
||||
end
|
||||
|
||||
let(:merge_request) do
|
||||
create(:merge_request,
|
||||
source_project: source_project, source_branch: 'feature',
|
||||
|
|
|
@ -1661,11 +1661,11 @@ describe Project, models: true do
|
|||
end
|
||||
|
||||
it 'does not return environment when no with_tags is set' do
|
||||
expect(project.environments_for('master', project.commit)).not_to contain_exactly(environment)
|
||||
expect(project.environments_for('master', project.commit)).to be_empty
|
||||
end
|
||||
|
||||
it 'does not return environment when commit is not part of deployment' do
|
||||
expect(project.environments_for('master', project.commit('feature'))).not_to contain_exactly(environment)
|
||||
expect(project.environments_for('master', project.commit('feature'))).to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1679,11 +1679,11 @@ describe Project, models: true do
|
|||
end
|
||||
|
||||
it 'does not environment when ref is different' do
|
||||
expect(project.environments_for('feature', project.commit)).not_to contain_exactly(environment)
|
||||
expect(project.environments_for('feature', project.commit)).to be_empty
|
||||
end
|
||||
|
||||
it 'does not return environment when commit is not part of deployment' do
|
||||
expect(project.environments_for('master', project.commit('feature'))).not_to contain_exactly(environment)
|
||||
expect(project.environments_for('master', project.commit('feature'))).to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue