Duplicate documentable code and rename for imageable

This commit is contained in:
Senén Rodero Rodríguez
2017-09-12 18:12:49 +02:00
parent 614ff79ba1
commit 6f71da07ee
59 changed files with 1362 additions and 520 deletions

View File

@@ -20,6 +20,9 @@ describe "Abilities::Administrator" do
let(:budget_investment_document) { build(:document, documentable: budget_investment) }
let(:poll_question_document) { build(:document, documentable: poll_question) }
let(:proposal_image) { build(:image, imageable: proposal) }
let(:budget_investment_image) { build(:image, imageable: budget_investment) }
let(:hidden_debate) { create(:debate, :hidden) }
let(:hidden_comment) { create(:comment, :hidden) }
let(:hidden_proposal) { create(:proposal, :hidden) }
@@ -82,6 +85,10 @@ describe "Abilities::Administrator" do
it { should be_able_to(:create, proposal_document) }
it { should be_able_to(:destroy, proposal_document) }
it { should be_able_to(:new, proposal_image) }
it { should be_able_to(:create, proposal_image) }
it { should be_able_to(:destroy, proposal_image) }
it { should be_able_to(:new, budget_investment_document) }
it { should be_able_to(:create, budget_investment_document) }
it { should be_able_to(:destroy, budget_investment_document) }
@@ -89,4 +96,9 @@ describe "Abilities::Administrator" do
it { should be_able_to(:new, poll_question_document) }
it { should be_able_to(:create, poll_question_document) }
it { should be_able_to(:destroy, poll_question_document) }
it { should be_able_to(:new, budget_investment_image) }
it { should be_able_to(:create, budget_investment_image) }
it { should be_able_to(:destroy, budget_investment_image) }
end