Bugfixing and several enhancements

* Added missing specs
* Removed models that were refactored previously
* Added simplecov when executing specs locally
* Fixed bug in poll model validation that was causing an 500 error.
This commit is contained in:
Juan Salvador Pérez García
2018-08-01 13:26:30 +02:00
parent 0e20247682
commit 5b5095b37b
11 changed files with 88 additions and 115 deletions

View File

@@ -126,6 +126,18 @@ feature "Proposal's dashboard" do
expect(page).to have_content('The request for the administrator has been successfully sent.')
end
scenario 'Request already requested resource with admin request', js: true do
feature = create(:dashboard_action, :resource, :active, :admin_request)
visit proposal_dashboard_index_path(proposal)
click_link(feature.title)
create(:dashboard_executed_action, action: feature, proposal: proposal)
click_button 'Request'
expect(page).to have_content('Proposal has already been taken')
end
scenario 'Resource without admin request do not have a request link', js: true do
feature = create(:dashboard_action, :resource, :active)