Commit 2dc1cf82 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'jh-remove-design-management-empty-version-factory' into 'master'

Remove invalid design management version factory trait

See merge request gitlab-org/gitlab!55163
parents f9e84f8a be7b829d
......@@ -13,11 +13,6 @@ FactoryBot.define do
deleted_designs { [] }
end
# Warning: this will intentionally result in an invalid version!
trait :empty do
designs_count { 0 }
end
trait :importing do
issue { nil }
......
......@@ -13,7 +13,6 @@ RSpec.describe 'factories' do
[:ci_job_artifact, :raw],
[:ci_job_artifact, :gzip],
[:ci_job_artifact, :correct_checksum],
[:design_version, :empty],
[:environment, :non_playable],
[:go_module_commit, :files],
[:go_module_commit, :package],
......
......@@ -35,7 +35,7 @@ module DesignManagementTestHelpers
def act_on_designs(designs, &block)
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|
yield.create!(design: d, version: version)
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