Allow create legislation proposals on process draft phase (Merge #3532)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<% if process.proposals_phase.open? %>
|
||||
<% if process.proposals_phase.open? || process.draft_phase.open? %>
|
||||
<p><%= link_to new_legislation_proposal_link_text(process),
|
||||
new_legislation_process_proposal_path(process),
|
||||
class: "button expanded",
|
||||
|
||||
@@ -198,6 +198,18 @@ describe "Legislation" do
|
||||
visit legislation_process_path(process)
|
||||
expect(page).to have_content("Français")
|
||||
end
|
||||
|
||||
scenario "Shows Create a Proposal button when process is in draft phase" do
|
||||
process = create(:legislation_process,
|
||||
:in_draft_phase,
|
||||
proposals_phase_start_date: Date.tomorrow)
|
||||
|
||||
login_as(administrator)
|
||||
visit legislation_process_proposals_path(process)
|
||||
click_link "Create a proposal"
|
||||
|
||||
expect(page).to have_current_path new_legislation_process_proposal_path(process)
|
||||
end
|
||||
end
|
||||
|
||||
context "homepage" do
|
||||
|
||||
Reference in New Issue
Block a user