diff options
author | Etienne BaquƩ <ebaque@gitlab.com> | 2019-09-03 12:38:59 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-09-03 12:38:59 +0300 |
commit | a43ab8d6a430014e875deb3bff3fd8d8da256747 (patch) | |
tree | 25da7465575e53501737bb0d71709021173f7319 /spec/factories/milestone_releases.rb | |
parent | de4e2dcafceee485cba9ef6993062b00a4929d2f (diff) |
Added relationships between Release and Milestone
Modified schema via migrations.
Added one-to-one relationship between the two models.
Added changelog file
Diffstat (limited to 'spec/factories/milestone_releases.rb')
-rw-r--r-- | spec/factories/milestone_releases.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/factories/milestone_releases.rb b/spec/factories/milestone_releases.rb new file mode 100644 index 00000000000..08e109480ab --- /dev/null +++ b/spec/factories/milestone_releases.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :milestone_release do + milestone + release + + before(:create, :build) do |mr| + project = create(:project) + mr.milestone.project = project + mr.release.project = project + end + end +end |