Skip to content
Snippets Groups Projects
Commit a2a00600 authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Rename Upvote role to Votes

parent 06c1a8a9
No related branches found
No related tags found
1 merge request!1409Update votes for issues and merge requests
class Issue < ActiveRecord::Base
include IssueCommonality
include Upvote
include Votes
 
acts_as_taggable_on :labels
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require File.join(Rails.root, "app/models/commit")
 
class MergeRequest < ActiveRecord::Base
include IssueCommonality
include Upvote
include Votes
 
BROKEN_DIFF = "--broken-diff"
 
Loading
Loading
module Upvote
module Votes
# Return the number of +1 comments (upvotes)
def upvotes
notes.select(&:upvote?).size
Loading
Loading
Loading
Loading
@@ -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) }
Loading
Loading
Loading
Loading
@@ -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
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment