Duplicate documentable code and rename for imageable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user