Public view for suggested actions as well as resources has been
completelly redesigned.

Private side for this feature has been adapted as well in order to meet
the requirements.
This commit is contained in:
Juan Salvador Pérez García
2018-07-02 17:16:59 +02:00
parent 53baf983b5
commit 3c3f60dfcc
31 changed files with 290 additions and 158 deletions

View File

@@ -7,7 +7,6 @@ describe ProposalDashboardAction do
description: description,
day_offset: day_offset,
required_supports: required_supports,
link: link,
request_to_administrators: request_to_administrators,
action_type: action_type
end
@@ -16,7 +15,6 @@ describe ProposalDashboardAction do
let(:description) { Faker::Lorem.sentence }
let(:day_offset) { 0 }
let(:required_supports) { 0 }
let(:link) { nil }
let(:request_to_administrators) { true }
let(:action_type) { 'resource' }
@@ -48,18 +46,6 @@ describe ProposalDashboardAction do
it { should_not be_valid }
end
context 'and description is very short' do
let(:description) { 'abc' }
it { should_not be_valid }
end
context 'and description is very long' do
let(:description) { 'a' * 256 }
it { should_not be_valid }
end
end
context 'when validating day_offset' do
@@ -102,32 +88,6 @@ describe ProposalDashboardAction do
end
end
context 'when url is blank' do
let(:link) { nil }
context 'and no request_to_administrators' do
let(:request_to_administrators) { false }
it { should_not be_valid }
end
context 'and request_to_administrators' do
let(:request_to_administrators) { true }
it { should be_valid }
end
end
context 'when url is not blank' do
let(:link) { Faker::Internet.url }
context 'and no request_to_administrators' do
let(:request_to_administrators) { false }
it { should be_valid }
end
end
context 'when action type is nil' do
let(:action_type) { nil }