summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-12-25 12:08:53 +0200
committerValery Sizov <vsv2711@gmail.com>2015-12-25 14:11:19 +0200
commit195dc3a7461468b060b9a9c6860aca37cebc9d8d (patch)
treea64253586d1da0f277fc75a101d199c607d291e1 /spec
parenta1b63e12526c069a8754b5e64deb9eb15668832a (diff)
downloadgitlab-ce-195dc3a7461468b060b9a9c6860aca37cebc9d8d.tar.gz
add sorting of awards
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/issues_helper_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb
index 04e795025d2..68df460da2d 100644
--- a/spec/helpers/issues_helper_spec.rb
+++ b/spec/helpers/issues_helper_spec.rb
@@ -141,4 +141,11 @@ describe IssuesHelper do
expect(note_active_class(Note.all, @note.author)).to eq("active")
end
end
+
+ describe "#awards_sort" do
+ it "sorts a hash so thumbsup and thumbsdown are always on top" do
+ data = {"thumbsdown" => "some value", "lifter" => "some value", "thumbsup" => "some value"}
+ expect(awards_sort(data).keys).to eq(["thumbsup", "thumbsdown", "lifter"])
+ end
+ end
end