Merge branch 'master' into voting-proposals

Conflicts:
	app/models/proposal.rb
	app/views/proposals/_proposal.html.erb
	app/views/proposals/index.html.erb
	app/views/proposals/show.html.erb
	spec/support/common_actions.rb
This commit is contained in:
Alberto Garcia Cabeza
2016-09-15 13:58:53 +02:00
31 changed files with 597 additions and 115 deletions

View File

@@ -197,6 +197,11 @@ module CommonActions
create(:proposal, title: "Fire and blood", question: "You talking to me?", cached_votes_up: Proposal.votes_needed_for_success + 1)]
end
def create_archived_proposals
[create(:proposal, title: "This is an expired proposal", created_at: Setting["months_to_archive_proposals"].to_i.months.ago),
create(:proposal, title: "This is an oldest expired proposal", created_at: (Setting["months_to_archive_proposals"].to_i + 2).months.ago)]
end
def tag_names(tag_cloud)
tag_cloud.tags.map(&:name)
end