Added tests

This commit is contained in:
María Checa
2017-10-31 12:24:13 +01:00
committed by Javi Martín
parent 056086e81e
commit d73be15296
2 changed files with 22 additions and 2 deletions

View File

@@ -237,5 +237,25 @@ feature 'Legislation' do
include_examples "not published permissions", :result_publication_legislation_process_path
end
context 'proposals phase' do
scenario 'not open' do
process = create(:legislation_process, proposals_phase_start_date: Date.current + 1.day, proposals_phase_end_date: Date.current + 2.days)
visit legislation_process_proposals_path(process)
expect(page).to have_content("This phase is not open yet")
end
scenario 'open' do
process = create(:legislation_process, proposals_phase_start_date: Date.current - 1.day, proposals_phase_end_date: Date.current + 2.days, proposals_phase_enabled: true)
visit legislation_process_proposals_path(process)
expect(page).to have_content("There are no proposals")
end
include_examples "not published permissions", :legislation_process_proposals_path
end
end
end