summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorvagrant <vagrant@precise32.(none)>2013-11-28 20:05:37 +0000
committervagrant <vagrant@precise32.(none)>2013-11-28 20:05:37 +0000
commit64efc05229b04d9928d621572d01bb1952ac0f65 (patch)
tree0f1f9065020e1f7feee2d102c558a839727d4124 /spec
parent2e07865f16f96bc4706758cc5f2634574d38be37 (diff)
downloadgitlab-ce-64efc05229b04d9928d621572d01bb1952ac0f65.tar.gz
added thumbsup and thumsdown emoji voting with rspec tests
Diffstat (limited to 'spec')
-rw-r--r--spec/models/note_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 42c405d8e50..55b264ce8cf 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -61,6 +61,11 @@ describe Note do
note.should be_upvote
end
+ it "recognizes a thumbsup emoji as a vote" do
+ note = build(:votable_note, note: ":thumbsup: for this")
+ note.should be_upvote
+ end
+
it "recognizes a -1 note" do
note = create(:votable_note, note: "-1 for this")
note.should be_downvote
@@ -70,6 +75,11 @@ describe Note do
note = build(:votable_note, note: ":-1: for this")
note.should be_downvote
end
+
+ it "recognizes a thumbsdown emoji as a vote" do
+ note = build(:votable_note, note: ":thumbsdown: for this")
+ note.should be_downvote
+ end
end
let(:project) { create(:project) }