Commit be7b829d authored by John Hope's avatar John Hope Committed by Thong Kuah

Remove invalid design management version factory trait

parent c4088b82
...@@ -13,11 +13,6 @@ FactoryBot.define do ...@@ -13,11 +13,6 @@ FactoryBot.define do
deleted_designs { [] } deleted_designs { [] }
end end
# Warning: this will intentionally result in an invalid version!
trait :empty do
designs_count { 0 }
end
trait :importing do trait :importing do
issue { nil } issue { nil }
......
...@@ -13,7 +13,6 @@ RSpec.describe 'factories' do ...@@ -13,7 +13,6 @@ RSpec.describe 'factories' do
[:ci_job_artifact, :raw], [:ci_job_artifact, :raw],
[:ci_job_artifact, :gzip], [:ci_job_artifact, :gzip],
[:ci_job_artifact, :correct_checksum], [:ci_job_artifact, :correct_checksum],
[:design_version, :empty],
[:environment, :non_playable], [:environment, :non_playable],
[:go_module_commit, :files], [:go_module_commit, :files],
[:go_module_commit, :package], [:go_module_commit, :package],
......
...@@ -35,7 +35,7 @@ module DesignManagementTestHelpers ...@@ -35,7 +35,7 @@ module DesignManagementTestHelpers
def act_on_designs(designs, &block) def act_on_designs(designs, &block)
issue = designs.first.issue issue = designs.first.issue
version = build(:design_version, :empty, issue: issue).tap { |v| v.save!(validate: false) } version = build(:design_version, designs_count: 0, issue: issue).tap { |v| v.save!(validate: false) }
designs.each do |d| designs.each do |d|
yield.create!(design: d, version: version) yield.create!(design: d, version: version)
end end
......
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