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 ...@@ -43,6 +43,10 @@ FactoryGirl.define do
commit factory: :ci_commit commit factory: :ci_commit
trait :canceled do
status 'canceled'
end
after(:build) do |build, evaluator| after(:build) do |build, evaluator|
build.project = build.commit.project build.project = build.commit.project
end end
...@@ -62,9 +66,5 @@ FactoryGirl.define do ...@@ -62,9 +66,5 @@ FactoryGirl.define do
build.trace = 'BUILD TRACE' build.trace = 'BUILD TRACE'
end end
end end
factory :ci_build_canceled do
status 'canceled'
end
end end
end end
...@@ -11,7 +11,7 @@ describe API::API, api: true do ...@@ -11,7 +11,7 @@ describe API::API, api: true do
let(:commit) { create(:ci_commit, project: project)} let(:commit) { create(:ci_commit, project: project)}
let(:build) { create(:ci_build, commit: commit) } let(:build) { create(:ci_build, commit: commit) }
let(:build_with_trace) { create(:ci_build_with_trace, 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 describe 'GET /projects/:id/builds ' do
context 'authorized user' 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