Poll questions documents tests added
This commit is contained in:
@@ -380,6 +380,10 @@ FactoryGirl.define do
|
||||
trait :budget_investment_document do
|
||||
association :documentable, factory: :budget_investment
|
||||
end
|
||||
|
||||
trait :poll_question_document do
|
||||
association :documentable, factory: :poll_question
|
||||
end
|
||||
end
|
||||
|
||||
factory :comment do
|
||||
|
||||
@@ -14,9 +14,11 @@ describe "Abilities::Administrator" do
|
||||
let(:proposal) { create(:proposal) }
|
||||
let(:budget_investment) { create(:budget_investment) }
|
||||
let(:legislation_question) { create(:legislation_question) }
|
||||
let(:poll_question) { create(:poll_question) }
|
||||
|
||||
let(:proposal_document) { build(:document, documentable: proposal) }
|
||||
let(:budget_investment_document) { build(:document, documentable: budget_investment) }
|
||||
let(:poll_question_document) { build(:document, documentable: poll_question) }
|
||||
|
||||
let(:hidden_debate) { create(:debate, :hidden) }
|
||||
let(:hidden_comment) { create(:comment, :hidden) }
|
||||
@@ -83,4 +85,8 @@ describe "Abilities::Administrator" do
|
||||
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) }
|
||||
|
||||
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) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user