Implements #173
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:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user