Commit 990bd06c authored by Tomasz Maczukin's avatar Tomasz Maczukin

Change :ci_build_canceled factory to :canceled trait

parent 97338496
......@@ -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
......@@ -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
......
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