Legislation Process page

This commit is contained in:
Amaia Castro
2016-12-21 19:48:58 +01:00
parent 4eb6b19f90
commit 36399277ec
23 changed files with 469 additions and 31 deletions

View File

@@ -35,4 +35,24 @@ feature 'Legislation' do
expect(page).to have_content('Process past')
end
end
context 'processes#show' do
scenario 'Debate phase not open' do
process = create(:legislation_process, title: "Process open",
debate_start_date: Date.current + 1.day, debate_end_date: Date.current + 2.days)
visit legislation_process_path(process)
expect(page).to have_content("This phase is not open yet")
end
scenario 'Debate phase open' do
process = create(:legislation_process, title: "Process open",
debate_start_date: Date.current - 1.day, debate_end_date: Date.current + 2.days)
visit legislation_process_path(process)
expect(page).to have_content("Participate in the debate")
end
end
end