Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-12 10:08:19 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-12 10:08:19 +0400
commit40eec08c99fe29963afed0f073b7bdbbfe31ac59 (patch)
treed4779b49b29c91cd65162e7a5e9ea875b7e3c8ba /spec/models
parentd8f6d38d39868426902ffbad9c232b7748a4288f (diff)
parent0bfcc574b660108646bd2c99a611163a0c847251 (diff)
Merge pull request #1409 from riyad/update-votes
Update votes for issues and merge requests
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/issue_spec.rb2
-rw-r--r--spec/models/merge_request_spec.rb2
-rw-r--r--spec/models/note_spec.rb23
3 files changed, 17 insertions, 10 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index ca6307e72b1..34192da94ad 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -12,7 +12,7 @@ describe Issue do
describe 'modules' do
it { should include_module(IssueCommonality) }
- it { should include_module(Upvote) }
+ it { should include_module(Votes) }
end
subject { Factory.create(:issue) }
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index d1253b35ae5..523e823de34 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -8,6 +8,6 @@ describe MergeRequest do
describe 'modules' do
it { should include_module(IssueCommonality) }
- it { should include_module(Upvote) }
+ it { should include_module(Votes) }
end
end
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index dddfd34c499..7809953f5b3 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -24,6 +24,13 @@ describe Note do
it "recognizes a neutral note" do
note = Factory(:note, note: "This is not a +1 note")
note.should_not be_upvote
+ note.should_not be_downvote
+ 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
+ note.should_not be_downvote
end
it "recognizes a +1 note" do
@@ -31,19 +38,19 @@ describe Note do
note.should be_upvote
end
- it "recognizes a -1 note as no vote" 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
+ it "recognizes a -1 note" do
+ note = Factory(:note, note: "-1 for this")
+ note.should be_downvote
+ end
+
+ it "recognizes a -1 emoji as a vote" do
+ note = build(:note, note: ":-1: for this")
+ note.should be_downvote
end
end