Allow to remove budget investment image from edit image page to authors and administrators.

This commit is contained in:
Senén Rodero Rodríguez
2017-06-23 14:23:58 +02:00
parent 943ef06ec8
commit 4469aa9b32
11 changed files with 85 additions and 8 deletions

View File

@@ -236,6 +236,7 @@ describe "Abilities::Common" do
it { should_not be_able_to(:create, ballot_in_selecting_budget) }
it { should be_able_to(:create, ballot_in_balloting_budget) }
it { should be_able_to(:edit_image, own_investment_in_accepting_budget) }
it { should be_able_to(:edit_image, own_investment_in_reviewing_budget) }
it { should be_able_to(:edit_image, own_investment_in_selecting_budget) }
@@ -244,6 +245,10 @@ describe "Abilities::Common" do
it { should be_able_to(:update_image, own_investment_in_reviewing_budget) }
it { should be_able_to(:update_image, own_investment_in_selecting_budget) }
it { should be_able_to(:update_image, own_investment_in_balloting_budget) }
it { should be_able_to(:remove_image, own_investment_in_accepting_budget) }
it { should be_able_to(:remove_image, own_investment_in_reviewing_budget) }
it { should be_able_to(:remove_image, own_investment_in_selecting_budget) }
it { should be_able_to(:remove_image, own_investment_in_balloting_budget) }
it { should_not be_able_to(:edit_image, investment_in_accepting_budget) }
it { should_not be_able_to(:edit_image, investment_in_reviewing_budget) }
@@ -253,6 +258,10 @@ describe "Abilities::Common" do
it { should_not be_able_to(:update_image, investment_in_reviewing_budget) }
it { should_not be_able_to(:update_image, investment_in_selecting_budget) }
it { should_not be_able_to(:update_image, investment_in_balloting_budget) }
it { should_not be_able_to(:remove_image, investment_in_accepting_budget) }
it { should_not be_able_to(:remove_image, investment_in_reviewing_budget) }
it { should_not be_able_to(:remove_image, investment_in_selecting_budget) }
it { should_not be_able_to(:remove_image, investment_in_balloting_budget) }
end
end