diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-12-25 12:08:53 +0200 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-12-25 14:11:19 +0200 |
commit | 195dc3a7461468b060b9a9c6860aca37cebc9d8d (patch) | |
tree | a64253586d1da0f277fc75a101d199c607d291e1 /spec | |
parent | a1b63e12526c069a8754b5e64deb9eb15668832a (diff) | |
download | gitlab-ce-195dc3a7461468b060b9a9c6860aca37cebc9d8d.tar.gz |
add sorting of awards
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 7 |
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 |