Commit 29a64950 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Improve specs

parent 630b666c
......@@ -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
......
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