Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-01-05 16:36:06 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-01-19 02:38:17 +0300
commitd6b11dafd37e78c12c982c42f274928293cdfa53 (patch)
treee20c62bc3b11b77e366bce2251146d5f5ec86e0c /spec/models/concerns
parent270dc22658424ee7f279db99e56c6fc69acd3eb7 (diff)
Support notes without project
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/mentionable_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/concerns/mentionable_spec.rb b/spec/models/concerns/mentionable_spec.rb
index 132858950d5..8321e0b89f8 100644
--- a/spec/models/concerns/mentionable_spec.rb
+++ b/spec/models/concerns/mentionable_spec.rb
@@ -138,6 +138,16 @@ describe Issue, "Mentionable" do
issue.update_attributes(description: issues[1].to_reference)
issue.create_new_cross_references!
end
+
+ it 'notifies new references from project snippet note' do
+ snippet = create(:snippet, project: project)
+ note = create(:note, note: issues[0].to_reference, noteable: snippet, project: project, author: author)
+
+ expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args)
+
+ note.update_attributes(note: issues[1].to_reference)
+ note.create_new_cross_references!
+ end
end
def create_issue(description:)