summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-01-13 16:05:49 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2016-01-13 16:05:49 +0100
commit990bd06c04bebe6319968aa619990bf4cb60483c (patch)
treefa334f931dbaf974ee7f99a71a44d15ecdb539dd
parent97338496188add9ec8d192c7e78f6a6040befffa (diff)
downloadgitlab-ce-990bd06c04bebe6319968aa619990bf4cb60483c.tar.gz
Change :ci_build_canceled factory to :canceled trait
-rw-r--r--spec/factories/ci/builds.rb8
-rw-r--r--spec/requests/api/builds_spec.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index 558598d4d5c..636cdbba1b8 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -43,6 +43,10 @@ FactoryGirl.define do
commit factory: :ci_commit
+ trait :canceled do
+ status 'canceled'
+ end
+
after(:build) do |build, evaluator|
build.project = build.commit.project
end
@@ -62,9 +66,5 @@ FactoryGirl.define do
build.trace = 'BUILD TRACE'
end
end
-
- factory :ci_build_canceled do
- status 'canceled'
- end
end
end
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb
index 4bf3d2681dc..e5567d42500 100644
--- a/spec/requests/api/builds_spec.rb
+++ b/spec/requests/api/builds_spec.rb
@@ -11,7 +11,7 @@ describe API::API, api: true do
let(:commit) { create(:ci_commit, project: project)}
let(:build) { create(:ci_build, commit: commit) }
let(:build_with_trace) { create(:ci_build_with_trace, commit: commit) }
- let(:build_canceled) { create(:ci_build_canceled, commit: commit) }
+ let(:build_canceled) { create(:ci_build, :canceled, commit: commit) }
describe 'GET /projects/:id/builds ' do
context 'authorized user' do