summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-12-24 19:46:35 +0200
committerValery Sizov <vsv2711@gmail.com>2015-12-25 14:11:19 +0200
commita1b63e12526c069a8754b5e64deb9eb15668832a (patch)
treede4a3742b8d69f5a37f3d6edec999378d0f9d375 /spec
parented777c7bcc990e5e3ff9f8e0d28a1e23af44d8f1 (diff)
downloadgitlab-ce-a1b63e12526c069a8754b5e64deb9eb15668832a.tar.gz
revert back vote buttons to issue and MR pages
Diffstat (limited to 'spec')
-rw-r--r--spec/models/note_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index b7006fa5e68..593d8f76215 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -137,9 +137,14 @@ describe Note, models: true do
create :note, note: "smile", is_award: true
end
- it "returns grouped array of notes" do
- expect(Note.grouped_awards.first.first).to eq("smile")
- expect(Note.grouped_awards.first.last).to match_array(Note.all)
+ it "returns grouped hash of notes" do
+ expect(Note.grouped_awards.keys.size).to eq(3)
+ expect(Note.grouped_awards["smile"]).to match_array(Note.all)
+ end
+
+ it "returns thumbsup and thumbsdown always" do
+ expect(Note.grouped_awards["thumbsup"]).to match_array(Note.none)
+ expect(Note.grouped_awards["thumbsdown"]).to match_array(Note.none)
end
end