Commit 065af93d authored by Shinya Maeda's avatar Shinya Maeda

Fix spec coding style

parent 060c5687
......@@ -89,7 +89,7 @@ describe Environment do
context 'when the latest deployment is successful' do
let!(:deployment) { create(:deployment, :start, :success, environment: environment) }
it { expect(subject.to_i).to eq(deployment.finished_at.to_i) }
it { expect(subject).to be_within(1.second).of(deployment.finished_at) }
end
context 'when the latest deployment failed' do
......
......@@ -109,7 +109,11 @@ describe EnvironmentStatus do
let(:pipeline) { create(:ci_pipeline, sha: sha, project: forked) }
let(:merge_request) do
create(:merge_request, source_project: forked, target_project: project, target_branch: 'master', head_pipeline: pipeline)
create(:merge_request,
source_project: forked,
target_project: project,
target_branch: 'master',
head_pipeline: pipeline)
end
it 'returns environment status' do
......@@ -126,7 +130,12 @@ describe EnvironmentStatus do
let(:pipeline) { create(:ci_pipeline, sha: sha, project: project) }
let(:merge_request) do
create(:merge_request, source_project: project, source_branch: 'feature', target_project: project, target_branch: 'master', head_pipeline: pipeline)
create(:merge_request,
source_project: project,
source_branch: 'feature',
target_project: project,
target_branch: 'master',
head_pipeline: pipeline)
end
it 'returns environment status' do
......
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