Merge branch 'stable' of github.com:AyuntamientoMadrid/participacion into stable
This commit is contained in:
@@ -3,7 +3,7 @@ module Taggable
|
|||||||
|
|
||||||
included do
|
included do
|
||||||
acts_as_taggable
|
acts_as_taggable
|
||||||
validate :max_number_of_tags
|
validate :max_number_of_tags, on: :create
|
||||||
end
|
end
|
||||||
|
|
||||||
def tag_list_with_limit(limit = nil)
|
def tag_list_with_limit(limit = nil)
|
||||||
|
|||||||
@@ -194,6 +194,22 @@ describe Proposal do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#cached_votes_up' do
|
||||||
|
|
||||||
|
describe "with deprecated long tag list" do
|
||||||
|
|
||||||
|
it "should increase number of cached_total_votes" do
|
||||||
|
proposal = create(:proposal)
|
||||||
|
|
||||||
|
tag_list = ["tag1", "tag2", "tag3", "tag4", "tag5", "tag6", "tag7"]
|
||||||
|
proposal.update_attribute(:tag_list, tag_list)
|
||||||
|
|
||||||
|
expect(proposal.update_cached_votes).to eq(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#hot_score' do
|
describe '#hot_score' do
|
||||||
let(:now) { Time.now }
|
let(:now) { Time.now }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user