summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r--spec/models/note_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 7a00ee83ba4..6be8a6a13f6 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -250,6 +250,16 @@ describe Note do
its(:project) { should == project }
its(:note) { should == "_mentioned in merge request !#{mergereq.iid}_" }
end
+
+ context 'commit from issue' do
+ subject { Note.create_cross_reference_note(commit, issue, author, project) }
+
+ it { should be_valid }
+ its(:noteable_type) { should == "Commit" }
+ its(:noteable_id) { should be_nil }
+ its(:commit_id) { should == commit.id }
+ its(:note) { should == "_mentioned in issue ##{issue.iid}_" }
+ end
end
describe '#cross_reference_exists?' do