diff options
| author | Robert Speicher <rspeicher@gmail.com> | 2012-09-06 15:31:25 -0400 |
|---|---|---|
| committer | Robert Speicher <rspeicher@gmail.com> | 2012-09-06 15:31:25 -0400 |
| commit | 2faa4bba40909778c1732894faf42a0f00e87cc4 (patch) | |
| tree | 13bc22b348968228cd78dd4d1e0b5d8bdc99fba4 /spec/models/note_spec.rb | |
| parent | 3a63f6f31622c5f96ff167b0c8df1367abbf5eda (diff) | |
| download | gitlab-ce-2faa4bba40909778c1732894faf42a0f00e87cc4.tar.gz | |
Update Note#upvote? to support emoji voting
Diffstat (limited to 'spec/models/note_spec.rb')
| -rw-r--r-- | spec/models/note_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index ffaf442d9a4..dddfd34c499 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -35,6 +35,16 @@ describe Note do note = Factory(:note, note: "-1 for this") note.should_not be_upvote end + + it "recognizes a +1 emoji as a vote" do + note = build(:note, note: ":+1: for this") + note.should be_upvote + end + + it "recognizes a neutral emoji note" do + note = build(:note, note: "I would :+1: this, but I don't want to") + note.should_not be_upvote + end end let(:project) { create(:project) } |
