summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-11-19 14:41:05 +0200
committerValery Sizov <vsv2711@gmail.com>2015-11-19 14:41:05 +0200
commit671a49cfd53230b57acf579a609bab958e066982 (patch)
treec3fbd7d3cea07cc9c6e66961336d02ee09a70baa /spec/models/note_spec.rb
parent23c5473cc0bd9b9034c5671fbea1356b0fb531e5 (diff)
downloadgitlab-ce-671a49cfd53230b57acf579a609bab958e066982.tar.gz
added specs
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r--spec/models/note_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 6e37dae07d0..86b6c27a182 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -129,4 +129,17 @@ describe Note do
it { expect(Note.search('wow')).to include(note) }
end
+
+ describe :grouped_awards do
+ before do
+ create :note, note: "smile"
+ create :note, note: "smile"
+ end
+
+ it "returns grouped array of notes" do
+ grouped_array = Note.grouped_awards
+ expect(Note.grouped_awards.first.first).to eq("smile")
+ expect(Note.grouped_awards.first.last).to match_array(Note.all)
+ end
+ end
end