summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-05 16:35:18 +0100
committerDouwe Maan <douwe@gitlab.com>2016-01-05 16:35:18 +0100
commit7a3b76297873782e2a56e77bcf55bbe950e57453 (patch)
tree817288dd9ddce2d7f09fbbf672f9fe1eb8925335 /spec/helpers
parentdcca64a5230bbfd53ef5db8403d132deac4667f2 (diff)
parent7c3c901ada6fc4a6d2d3ce7a2cf8188cf6615008 (diff)
downloadgitlab-ce-7a3b76297873782e2a56e77bcf55bbe950e57453.tar.gz
Merge branch 'master' into more-opengraph
# Conflicts: # app/views/layouts/_head.html.haml
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/issues_helper_spec.rb7
-rw-r--r--spec/helpers/search_helper_spec.rb2
2 files changed, 8 insertions, 1 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb
index 04e795025d2..ffd8ebae029 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
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index ebe9c29d91c..f0d553f5f1d 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -43,7 +43,7 @@ describe SearchHelper do
end
it "includes the public group" do
- group = create(:group, public: true)
+ group = create(:group)
expect(search_autocomplete_opts(group.name).size).to eq(1)
end