Change single quotes to double quotes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
require "rails_helper"
|
||||
|
||||
feature 'Legislation Draft Versions' do
|
||||
feature "Legislation Draft Versions" do
|
||||
let(:user) { create(:user) }
|
||||
let(:administrator) do
|
||||
create(:administrator, user: user)
|
||||
@@ -23,7 +23,7 @@ feature 'Legislation Draft Versions' do
|
||||
|
||||
expect(page).to have_content("Body of the first version")
|
||||
|
||||
within('select#draft_version_id') do
|
||||
within("select#draft_version_id") do
|
||||
expect(page).to have_content("Version 1")
|
||||
expect(page).to have_content("Version 2")
|
||||
expect(page).not_to have_content("Version 3")
|
||||
@@ -37,7 +37,7 @@ feature 'Legislation Draft Versions' do
|
||||
|
||||
expect(page).to have_content("Body of the third version")
|
||||
|
||||
within('select#draft_version_id') do
|
||||
within("select#draft_version_id") do
|
||||
expect(page).to have_content("Version 1")
|
||||
expect(page).to have_content("Version 2")
|
||||
expect(page).to have_content("Version 3 *")
|
||||
@@ -97,7 +97,7 @@ feature 'Legislation Draft Versions' do
|
||||
|
||||
expect(page).to have_content("Changes for first version")
|
||||
|
||||
within('select#draft_version_id') do
|
||||
within("select#draft_version_id") do
|
||||
expect(page).to have_content("Version 1")
|
||||
expect(page).to have_content("Version 2")
|
||||
expect(page).not_to have_content("Version 3")
|
||||
@@ -111,7 +111,7 @@ feature 'Legislation Draft Versions' do
|
||||
|
||||
expect(page).to have_content("Changes for third version")
|
||||
|
||||
within('select#draft_version_id') do
|
||||
within("select#draft_version_id") do
|
||||
expect(page).to have_content("Version 1")
|
||||
expect(page).to have_content("Version 2")
|
||||
expect(page).to have_content("Version 3 *")
|
||||
@@ -140,12 +140,12 @@ feature 'Legislation Draft Versions' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'Annotations', :js do
|
||||
context "Annotations", :js do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
background { login_as user }
|
||||
|
||||
scenario 'Visit as anonymous' do
|
||||
scenario "Visit as anonymous" do
|
||||
logout
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
|
||||
@@ -153,11 +153,11 @@ feature 'Legislation Draft Versions' do
|
||||
|
||||
page.find(:css, ".legislation-annotatable").double_click
|
||||
page.find(:css, ".annotator-adder button").click
|
||||
expect(page).not_to have_css('#legislation_annotation_text')
|
||||
expect(page).not_to have_css("#legislation_annotation_text")
|
||||
expect(page).to have_content "You must Sign in or Sign up to leave a comment."
|
||||
end
|
||||
|
||||
scenario 'Create' do
|
||||
scenario "Create" do
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
|
||||
visit legislation_process_draft_version_path(draft_version.process, draft_version)
|
||||
@@ -167,7 +167,7 @@ feature 'Legislation Draft Versions' do
|
||||
page.click_button "Publish Comment"
|
||||
expect(page).to have_content "Comment can't be blank"
|
||||
|
||||
fill_in 'legislation_annotation_text', with: 'this is my annotation'
|
||||
fill_in "legislation_annotation_text", with: "this is my annotation"
|
||||
page.click_button "Publish Comment"
|
||||
|
||||
expect(page).to have_css ".annotator-hl"
|
||||
@@ -181,7 +181,7 @@ feature 'Legislation Draft Versions' do
|
||||
expect(page).to have_content "this is my annotation"
|
||||
end
|
||||
|
||||
scenario 'View annotations and comments' do
|
||||
scenario "View annotations and comments" do
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
annotation1 = create(:legislation_annotation, draft_version: draft_version, text: "my annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}])
|
||||
@@ -224,7 +224,7 @@ feature 'Legislation Draft Versions' do
|
||||
|
||||
background { login_as user }
|
||||
|
||||
scenario 'View annotations and comments in an included range' do
|
||||
scenario "View annotations and comments in an included range" do
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
annotation1 = create(:legislation_annotation, draft_version: draft_version, text: "my annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 5}])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
require "rails_helper"
|
||||
|
||||
feature 'Legislation' do
|
||||
feature "Legislation" do
|
||||
|
||||
let!(:administrator) { create(:administrator).user }
|
||||
|
||||
@@ -24,7 +24,7 @@ feature 'Legislation' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'processes home page' do
|
||||
context "processes home page" do
|
||||
|
||||
scenario "No processes to be listed" do
|
||||
visit legislation_processes_path
|
||||
@@ -34,7 +34,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_text "There aren't past processes"
|
||||
end
|
||||
|
||||
scenario 'Processes can be listed' do
|
||||
scenario "Processes can be listed" do
|
||||
processes = create_list(:legislation_process, 3)
|
||||
|
||||
visit legislation_processes_path
|
||||
@@ -55,7 +55,7 @@ feature 'Legislation' do
|
||||
expect("Process 2").to appear_before("Process 1")
|
||||
end
|
||||
|
||||
scenario 'Participation phases are displayed only if there is a phase enabled' do
|
||||
scenario "Participation phases are displayed only if there is a phase enabled" do
|
||||
process = create(:legislation_process, :empty)
|
||||
process_debate = create(:legislation_process)
|
||||
|
||||
@@ -68,7 +68,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("Participation phases")
|
||||
end
|
||||
|
||||
scenario 'Participation phases are displayed on current locale' do
|
||||
scenario "Participation phases are displayed on current locale" do
|
||||
process = create(:legislation_process, proposals_phase_start_date: Date.new(2018, 01, 01),
|
||||
proposals_phase_end_date: Date.new(2018, 12, 01))
|
||||
|
||||
@@ -85,19 +85,19 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("01 ene 2018 - 01 dic 2018")
|
||||
end
|
||||
|
||||
scenario 'Filtering processes' do
|
||||
scenario "Filtering processes" do
|
||||
create(:legislation_process, title: "Process open")
|
||||
create(:legislation_process, :past, title: "Process past")
|
||||
create(:legislation_process, :in_draft_phase, title: "Process in draft phase")
|
||||
|
||||
visit legislation_processes_path
|
||||
expect(page).to have_content('Process open')
|
||||
expect(page).not_to have_content('Process past')
|
||||
expect(page).not_to have_content('Process in draft phase')
|
||||
expect(page).to have_content("Process open")
|
||||
expect(page).not_to have_content("Process past")
|
||||
expect(page).not_to have_content("Process in draft phase")
|
||||
|
||||
visit legislation_processes_path(filter: 'past')
|
||||
expect(page).not_to have_content('Process open')
|
||||
expect(page).to have_content('Process past')
|
||||
visit legislation_processes_path(filter: "past")
|
||||
expect(page).not_to have_content("Process open")
|
||||
expect(page).to have_content("Process past")
|
||||
end
|
||||
|
||||
context "not published processes" do
|
||||
@@ -110,33 +110,33 @@ feature 'Legislation' do
|
||||
|
||||
it "aren't listed" do
|
||||
visit legislation_processes_path
|
||||
expect(page).not_to have_content('not published')
|
||||
expect(page).to have_content('published')
|
||||
expect(page).not_to have_content("not published")
|
||||
expect(page).to have_content("published")
|
||||
|
||||
login_as(administrator)
|
||||
visit legislation_processes_path
|
||||
expect(page).not_to have_content('not published')
|
||||
expect(page).to have_content('published')
|
||||
expect(page).not_to have_content("not published")
|
||||
expect(page).to have_content("published")
|
||||
end
|
||||
|
||||
it "aren't listed with past filter" do
|
||||
visit legislation_processes_path(filter: 'past')
|
||||
expect(page).not_to have_content('not published')
|
||||
expect(page).to have_content('past published')
|
||||
visit legislation_processes_path(filter: "past")
|
||||
expect(page).not_to have_content("not published")
|
||||
expect(page).to have_content("past published")
|
||||
|
||||
login_as(administrator)
|
||||
visit legislation_processes_path(filter: 'past')
|
||||
expect(page).not_to have_content('not published')
|
||||
expect(page).to have_content('past published')
|
||||
visit legislation_processes_path(filter: "past")
|
||||
expect(page).not_to have_content("not published")
|
||||
expect(page).to have_content("past published")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'process page' do
|
||||
context "process page" do
|
||||
context "show" do
|
||||
include_examples "not published permissions", :legislation_process_path
|
||||
|
||||
scenario 'show view has document present on all phases' do
|
||||
scenario "show view has document present on all phases" do
|
||||
process = create(:legislation_process)
|
||||
document = create(:document, documentable: process)
|
||||
phases = ["Debate", "Proposals", "Comments"]
|
||||
@@ -145,14 +145,14 @@ feature 'Legislation' do
|
||||
|
||||
phases.each do |phase|
|
||||
within(".legislation-process-list") do
|
||||
find('li', :text => "#{phase}").click_link
|
||||
find("li", :text => "#{phase}").click_link
|
||||
end
|
||||
|
||||
expect(page).to have_content(document.title)
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'show draft publication and final result publication dates' do
|
||||
scenario "show draft publication and final result publication dates" do
|
||||
process = create(:legislation_process, draft_publication_date: Date.new(2019, 01, 10),
|
||||
result_publication_date: Date.new(2019, 01, 20))
|
||||
|
||||
@@ -166,7 +166,7 @@ feature 'Legislation' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'do not show draft publication and final result publication dates if are empty' do
|
||||
scenario "do not show draft publication and final result publication dates if are empty" do
|
||||
process = create(:legislation_process, :empty)
|
||||
|
||||
visit legislation_process_path(process)
|
||||
@@ -177,7 +177,7 @@ feature 'Legislation' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'show additional info button' do
|
||||
scenario "show additional info button" do
|
||||
process = create(:legislation_process, additional_info: "Text for additional info of the process")
|
||||
|
||||
visit legislation_process_path(process)
|
||||
@@ -186,7 +186,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("Text for additional info of the process")
|
||||
end
|
||||
|
||||
scenario 'do not show additional info button if it is empty' do
|
||||
scenario "do not show additional info button if it is empty" do
|
||||
process = create(:legislation_process)
|
||||
|
||||
visit legislation_process_path(process)
|
||||
@@ -203,10 +203,10 @@ feature 'Legislation' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'homepage' do
|
||||
scenario 'enabled' do
|
||||
context "homepage" do
|
||||
scenario "enabled" do
|
||||
process = create(:legislation_process, homepage_enabled: true,
|
||||
homepage: 'This is the process homepage',
|
||||
homepage: "This is the process homepage",
|
||||
debate_start_date: Date.current + 1.day,
|
||||
debate_end_date: Date.current + 2.days)
|
||||
|
||||
@@ -220,9 +220,9 @@ feature 'Legislation' do
|
||||
expect(page).not_to have_content("Participate in the debate")
|
||||
end
|
||||
|
||||
scenario 'disabled', :with_frozen_time do
|
||||
scenario "disabled", :with_frozen_time do
|
||||
process = create(:legislation_process, homepage_enabled: false,
|
||||
homepage: 'This is the process homepage',
|
||||
homepage: "This is the process homepage",
|
||||
debate_start_date: Date.current + 1.day,
|
||||
debate_end_date: Date.current + 2.days)
|
||||
|
||||
@@ -237,8 +237,8 @@ feature 'Legislation' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'debate phase' do
|
||||
scenario 'not open', :with_frozen_time do
|
||||
context "debate phase" do
|
||||
scenario "not open", :with_frozen_time do
|
||||
process = create(:legislation_process, debate_start_date: Date.current + 1.day, debate_end_date: Date.current + 2.days)
|
||||
|
||||
visit legislation_process_path(process)
|
||||
@@ -247,7 +247,7 @@ feature 'Legislation' do
|
||||
expect(page).not_to have_content("Participate in the debate")
|
||||
end
|
||||
|
||||
scenario 'open without questions' do
|
||||
scenario "open without questions" do
|
||||
process = create(:legislation_process, debate_start_date: Date.current - 1.day, debate_end_date: Date.current + 2.days)
|
||||
|
||||
visit legislation_process_path(process)
|
||||
@@ -256,7 +256,7 @@ feature 'Legislation' do
|
||||
expect(page).not_to have_content("This phase is not open yet")
|
||||
end
|
||||
|
||||
scenario 'open with questions' do
|
||||
scenario "open with questions" do
|
||||
process = create(:legislation_process, debate_start_date: Date.current - 1.day, debate_end_date: Date.current + 2.days)
|
||||
create(:legislation_question, process: process, title: "Question 1")
|
||||
create(:legislation_question, process: process, title: "Question 2")
|
||||
@@ -272,8 +272,8 @@ feature 'Legislation' do
|
||||
include_examples "not published permissions", :debate_legislation_process_path
|
||||
end
|
||||
|
||||
context 'draft publication phase' do
|
||||
scenario 'not open', :with_frozen_time do
|
||||
context "draft publication phase" do
|
||||
scenario "not open", :with_frozen_time do
|
||||
process = create(:legislation_process, draft_publication_date: Date.current + 1.day)
|
||||
|
||||
visit draft_publication_legislation_process_path(process)
|
||||
@@ -281,7 +281,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("This phase is not open yet")
|
||||
end
|
||||
|
||||
scenario 'open' do
|
||||
scenario "open" do
|
||||
process = create(:legislation_process, draft_publication_date: Date.current)
|
||||
|
||||
visit draft_publication_legislation_process_path(process)
|
||||
@@ -292,8 +292,8 @@ feature 'Legislation' do
|
||||
include_examples "not published permissions", :draft_publication_legislation_process_path
|
||||
end
|
||||
|
||||
context 'allegations phase' do
|
||||
scenario 'not open', :with_frozen_time do
|
||||
context "allegations phase" do
|
||||
scenario "not open", :with_frozen_time do
|
||||
process = create(:legislation_process, allegations_start_date: Date.current + 1.day, allegations_end_date: Date.current + 2.days)
|
||||
|
||||
visit allegations_legislation_process_path(process)
|
||||
@@ -301,7 +301,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("This phase is not open yet")
|
||||
end
|
||||
|
||||
scenario 'open' do
|
||||
scenario "open" do
|
||||
process = create(:legislation_process, allegations_start_date: Date.current - 1.day, allegations_end_date: Date.current + 2.days)
|
||||
|
||||
visit allegations_legislation_process_path(process)
|
||||
@@ -312,8 +312,8 @@ feature 'Legislation' do
|
||||
include_examples "not published permissions", :allegations_legislation_process_path
|
||||
end
|
||||
|
||||
context 'final version publication phase' do
|
||||
scenario 'not open', :with_frozen_time do
|
||||
context "final version publication phase" do
|
||||
scenario "not open", :with_frozen_time do
|
||||
process = create(:legislation_process, result_publication_date: Date.current + 1.day)
|
||||
|
||||
visit result_publication_legislation_process_path(process)
|
||||
@@ -321,7 +321,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("This phase is not open yet")
|
||||
end
|
||||
|
||||
scenario 'open' do
|
||||
scenario "open" do
|
||||
process = create(:legislation_process, result_publication_date: Date.current)
|
||||
|
||||
visit result_publication_legislation_process_path(process)
|
||||
@@ -332,8 +332,8 @@ feature 'Legislation' do
|
||||
include_examples "not published permissions", :result_publication_legislation_process_path
|
||||
end
|
||||
|
||||
context 'proposals phase' do
|
||||
scenario 'not open', :with_frozen_time do
|
||||
context "proposals phase" do
|
||||
scenario "not open", :with_frozen_time do
|
||||
process = create(:legislation_process, :upcoming_proposals_phase)
|
||||
|
||||
visit legislation_process_proposals_path(process)
|
||||
@@ -341,7 +341,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("This phase is not open yet")
|
||||
end
|
||||
|
||||
scenario 'open' do
|
||||
scenario "open" do
|
||||
process = create(:legislation_process, :in_proposals_phase)
|
||||
|
||||
visit legislation_process_proposals_path(process)
|
||||
@@ -349,7 +349,7 @@ feature 'Legislation' do
|
||||
expect(page).to have_content("There are no proposals")
|
||||
end
|
||||
|
||||
scenario 'create proposal button redirects to register path if user is not logged in' do
|
||||
scenario "create proposal button redirects to register path if user is not logged in" do
|
||||
process = create(:legislation_process, :in_proposals_phase)
|
||||
|
||||
visit legislation_process_proposals_path(process)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'rails_helper'
|
||||
require 'sessions_helper'
|
||||
require "rails_helper"
|
||||
require "sessions_helper"
|
||||
|
||||
feature 'Legislation Proposals' do
|
||||
feature "Legislation Proposals" do
|
||||
|
||||
let(:user) { create(:user) }
|
||||
let(:user2) { create(:user) }
|
||||
@@ -9,14 +9,14 @@ feature 'Legislation Proposals' do
|
||||
let(:proposal) { create(:legislation_proposal) }
|
||||
|
||||
context "Concerns" do
|
||||
it_behaves_like 'notifiable in-app', Legislation::Proposal
|
||||
it_behaves_like "notifiable in-app", Legislation::Proposal
|
||||
end
|
||||
|
||||
scenario "Only one menu element has 'active' CSS selector" do
|
||||
visit legislation_process_proposal_path(proposal.process, proposal)
|
||||
|
||||
within('#navigation_bar') do
|
||||
expect(page).to have_css('.is-active', count: 1)
|
||||
within("#navigation_bar") do
|
||||
expect(page).to have_css(".is-active", count: 1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -81,43 +81,43 @@ feature 'Legislation Proposals' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'Selected filter' do
|
||||
scenario 'apperars even if there are not any selected poposals' do
|
||||
context "Selected filter" do
|
||||
scenario "apperars even if there are not any selected poposals" do
|
||||
create(:legislation_proposal, legislation_process_id: process.id)
|
||||
|
||||
visit legislation_process_proposals_path(process)
|
||||
|
||||
expect(page).to have_content('Selected')
|
||||
expect(page).to have_content("Selected")
|
||||
end
|
||||
|
||||
scenario 'defaults to winners if there are selected proposals' do
|
||||
scenario "defaults to winners if there are selected proposals" do
|
||||
create(:legislation_proposal, legislation_process_id: process.id)
|
||||
create(:legislation_proposal, legislation_process_id: process.id, selected: true)
|
||||
|
||||
visit legislation_process_proposals_path(process)
|
||||
|
||||
expect(page).to have_link('Random')
|
||||
expect(page).not_to have_link('Selected')
|
||||
expect(page).to have_content('Selected')
|
||||
expect(page).to have_link("Random")
|
||||
expect(page).not_to have_link("Selected")
|
||||
expect(page).to have_content("Selected")
|
||||
end
|
||||
|
||||
scenario 'defaults to random if the current process does not have selected proposals' do
|
||||
scenario "defaults to random if the current process does not have selected proposals" do
|
||||
create(:legislation_proposal, legislation_process_id: process.id)
|
||||
create(:legislation_proposal, selected: true)
|
||||
|
||||
visit legislation_process_proposals_path(process)
|
||||
|
||||
expect(page).to have_link('Selected')
|
||||
expect(page).not_to have_link('Random')
|
||||
expect(page).to have_content('Random')
|
||||
expect(page).to have_link("Selected")
|
||||
expect(page).not_to have_link("Random")
|
||||
expect(page).to have_content("Random")
|
||||
end
|
||||
|
||||
scenario 'filters correctly' do
|
||||
scenario "filters correctly" do
|
||||
proposal1 = create(:legislation_proposal, legislation_process_id: process.id)
|
||||
proposal2 = create(:legislation_proposal, legislation_process_id: process.id, selected: true)
|
||||
|
||||
visit legislation_process_proposals_path(process, filter: "random")
|
||||
click_link 'Selected'
|
||||
click_link "Selected"
|
||||
|
||||
expect(page).to have_css("div#legislation_proposal_#{proposal2.id}")
|
||||
expect(page).not_to have_css("div#legislation_proposal_#{proposal1.id}")
|
||||
@@ -135,14 +135,14 @@ feature 'Legislation Proposals' do
|
||||
|
||||
visit new_legislation_process_proposal_path(process)
|
||||
|
||||
fill_in 'Proposal title', with: 'Legislation proposal with image'
|
||||
fill_in 'Proposal summary', with: 'Including an image on a legislation proposal'
|
||||
imageable_attach_new_file(create(:image), Rails.root.join('spec/fixtures/files/clippy.jpg'))
|
||||
check 'legislation_proposal_terms_of_service'
|
||||
click_button 'Create proposal'
|
||||
fill_in "Proposal title", with: "Legislation proposal with image"
|
||||
fill_in "Proposal summary", with: "Including an image on a legislation proposal"
|
||||
imageable_attach_new_file(create(:image), Rails.root.join("spec/fixtures/files/clippy.jpg"))
|
||||
check "legislation_proposal_terms_of_service"
|
||||
click_button "Create proposal"
|
||||
|
||||
expect(page).to have_content 'Legislation proposal with image'
|
||||
expect(page).to have_content 'Including an image on a legislation proposal'
|
||||
expect(page).to have_content "Legislation proposal with image"
|
||||
expect(page).to have_content "Including an image on a legislation proposal"
|
||||
expect(page).to have_css("img[alt='#{Legislation::Proposal.last.image.title}']")
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'rails_helper'
|
||||
require "rails_helper"
|
||||
|
||||
feature 'Legislation' do
|
||||
context 'process debate page' do
|
||||
feature "Legislation" do
|
||||
context "process debate page" do
|
||||
before do
|
||||
@process = create(:legislation_process, debate_start_date: Date.current - 3.days, debate_end_date: Date.current + 2.days)
|
||||
create(:legislation_question, process: @process, title: "Question 1")
|
||||
@@ -9,7 +9,7 @@ feature 'Legislation' do
|
||||
create(:legislation_question, process: @process, title: "Question 3")
|
||||
end
|
||||
|
||||
scenario 'shows question list' do
|
||||
scenario "shows question list" do
|
||||
visit legislation_process_path(@process)
|
||||
|
||||
expect(page).to have_content("Participate in the debate")
|
||||
@@ -34,14 +34,14 @@ feature 'Legislation' do
|
||||
expect(page).not_to have_content("Next question")
|
||||
end
|
||||
|
||||
scenario 'shows question page' do
|
||||
scenario "shows question page" do
|
||||
visit legislation_process_question_path(@process, @process.questions.first)
|
||||
|
||||
expect(page).to have_content("Question 1")
|
||||
expect(page).to have_content("Open answers (0)")
|
||||
end
|
||||
|
||||
scenario 'shows next question link in question page' do
|
||||
scenario "shows next question link in question page" do
|
||||
visit legislation_process_question_path(@process, @process.questions.first)
|
||||
|
||||
expect(page).to have_content("Question 1")
|
||||
@@ -58,7 +58,7 @@ feature 'Legislation' do
|
||||
expect(page).not_to have_content("Next question")
|
||||
end
|
||||
|
||||
scenario 'answer question' do
|
||||
scenario "answer question" do
|
||||
question = @process.questions.first
|
||||
create(:legislation_question_option, question: question, value: "Yes")
|
||||
create(:legislation_question_option, question: question, value: "No")
|
||||
@@ -88,7 +88,7 @@ feature 'Legislation' do
|
||||
expect(option.reload.answers_count).to eq(1)
|
||||
end
|
||||
|
||||
scenario 'cannot answer question when phase not open' do
|
||||
scenario "cannot answer question when phase not open" do
|
||||
@process.update_attribute(:debate_end_date, Date.current - 1.day)
|
||||
question = @process.questions.first
|
||||
create(:legislation_question_option, question: question, value: "Yes")
|
||||
|
||||
Reference in New Issue
Block a user