diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-03 16:58:27 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-04 16:11:17 +0200 |
commit | 964933c9638c7d039a2843375d76c76c0b2cf25e (patch) | |
tree | b1887dca99cff898057460804802a5944b15d8bc /spec | |
parent | b15dd5dfa2ac269763d6342d7f0b3d9a64eb7fe4 (diff) | |
download | gitlab-ce-964933c9638c7d039a2843375d76c76c0b2cf25e.tar.gz |
Create metadata object on build object creation
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/ci/build_metadata.rb | 9 | ||||
-rw-r--r-- | spec/models/ci/build_metadata_spec.rb | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/spec/factories/ci/build_metadata.rb b/spec/factories/ci/build_metadata.rb deleted file mode 100644 index 66bbd977b88..00000000000 --- a/spec/factories/ci/build_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -FactoryBot.define do - factory :ci_build_metadata, class: Ci::BuildMetadata do - build factory: :ci_build - - after(:build) do |build_metadata, _| - build_metadata.project ||= build_metadata.build.project - end - end -end diff --git a/spec/models/ci/build_metadata_spec.rb b/spec/models/ci/build_metadata_spec.rb index 268561ee941..7e75d5a5411 100644 --- a/spec/models/ci/build_metadata_spec.rb +++ b/spec/models/ci/build_metadata_spec.rb @@ -13,7 +13,7 @@ describe Ci::BuildMetadata do end let(:build) { create(:ci_build, pipeline: pipeline) } - let(:build_metadata) { create(:ci_build_metadata, build: build) } + let(:build_metadata) { build.metadata } describe '#update_timeout_state' do subject { build_metadata } |