summaryrefslogtreecommitdiff
path: root/spec/factories/notes.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2016-12-22 13:31:12 +0100
committerBob Van Landuyt <bob@gitlab.com>2017-03-13 08:27:51 +0100
commit0267b83898d604181e70c5ea8ac4a84108d2e6d6 (patch)
tree3ce8cc81ba90185c976f3b19b7e548c67856370f /spec/factories/notes.rb
parent9ed3db915026c6e0cd266a1c276386e3e96d2151 (diff)
downloadgitlab-ce-0267b83898d604181e70c5ea8ac4a84108d2e6d6.tar.gz
Delegate a single discussion to a new issue
Delegate a discussion in a merge request into a new issue. The discussion wil be marked as resolved and a system note will be added linking to the newly created issue.
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r--spec/factories/notes.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb
index 5c50cd7f4ad..fe19a404e16 100644
--- a/spec/factories/notes.rb
+++ b/spec/factories/notes.rb
@@ -26,12 +26,17 @@ FactoryGirl.define do
factory :diff_note_on_merge_request, traits: [:on_merge_request], class: DiffNote do
association :project, :repository
+
+ transient do
+ line_number 14
+ end
+
position do
Gitlab::Diff::Position.new(
old_path: "files/ruby/popen.rb",
new_path: "files/ruby/popen.rb",
old_line: nil,
- new_line: 14,
+ new_line: line_number,
diff_refs: noteable.diff_refs
)
end