Add load_and_authorize_resource to images controller

This commit is contained in:
taitus
2022-09-09 17:14:55 +02:00
parent 99495a21d2
commit 83e0d4c6b7
4 changed files with 10 additions and 8 deletions

View File

@@ -18,6 +18,8 @@ describe Abilities::Administrator do
let(:legislation_question) { create(:legislation_question) }
let(:poll) { create(:poll) }
let(:poll_question) { create(:poll_question) }
let(:poll_question_answer) { create(:poll_question_answer) }
let(:answer_image) { build(:image, imageable: poll_question_answer) }
let(:past_process) { create(:legislation_process, :past) }
let(:past_draft_process) { create(:legislation_process, :past, :not_published) }
@@ -118,6 +120,9 @@ describe Abilities::Administrator do
it { should be_able_to(:manage, Poll::Question::Answer::Video) }
it { should be_able_to(:create, answer_image) }
it { should be_able_to(:destroy, answer_image) }
it { is_expected.to be_able_to :manage, Dashboard::AdministratorTask }
it { is_expected.to be_able_to :manage, dashboard_administrator_task }