summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-02-26 16:53:23 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 13:57:16 +0200
commitf18eb6dae43b8407ceb8bcbdecd6df30af2a66ac (patch)
treecc182818a9e2d92b9ecacf4b189ab9a9d75e1374 /spec/models
parent40f57b9b62f768f5aa66ef6d3e8d0922ffe7ec0f (diff)
downloadgitlab-ce-f18eb6dae43b8407ceb8bcbdecd6df30af2a66ac.tar.gz
Add styling improvements in specs
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/ci/build_spec.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 115106548f0..cceb2033cbb 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -1274,10 +1274,13 @@ describe Ci::Build do
describe '#timeout' do
set(:project2) { create(:project, :repository, group: group, build_timeout: 1000) }
set(:pipeline2) { create(:ci_pipeline, project: project2, sha: project2.commit.id, ref: project2.default_branch, status: 'success') }
+
let(:build) { create(:ci_build, :manual, pipeline: pipeline2) }
+ subject { build.timeout }
+
it 'returns project timeout configuration' do
- expect(build.timeout).to eq(project2.build_timeout)
+ is_expected.to eq(project2.build_timeout)
end
context 'when runner sets timeout to bigger value' do
@@ -1285,7 +1288,7 @@ describe Ci::Build do
let(:build) { create(:ci_build, :manual, pipeline: pipeline2, runner: runner2) }
it 'returns project timeout configuration' do
- expect(build.timeout).to eq(project2.build_timeout)
+ is_expected.to eq(project2.build_timeout)
end
end
@@ -1294,7 +1297,7 @@ describe Ci::Build do
let(:build) { create(:ci_build, :manual, pipeline: pipeline2, runner: runner2) }
it 'returns project timeout configuration' do
- expect(build.timeout).to eq(runner2.maximum_job_timeout)
+ is_expected.to eq(runner2.maximum_job_timeout)
end
end
end