+ HTML
end
it "accepts options for links" do
diff --git a/spec/components/valuation/budgets/row_component_spec.rb b/spec/components/valuation/budgets/row_component_spec.rb
index 63d0e7370..212096a82 100644
--- a/spec/components/valuation/budgets/row_component_spec.rb
+++ b/spec/components/valuation/budgets/row_component_spec.rb
@@ -30,9 +30,9 @@ describe Valuation::Budgets::RowComponent do
it "does not count investments with valuation finished" do
budget = create(:budget, :valuating)
create(:budget_investment, :visible_to_valuators,
- budget: budget,
- valuators: [valuator],
- valuation_finished: true)
+ budget: budget,
+ valuators: [valuator],
+ valuation_finished: true)
render_inline Valuation::Budgets::RowComponent.new(budget: budget)
@@ -81,9 +81,9 @@ describe Valuation::Budgets::RowComponent do
it "is shown when the assigned investments have finished valuation" do
budget = create(:budget, :valuating)
create(:budget_investment, :visible_to_valuators,
- budget: budget,
- valuators: [valuator],
- valuation_finished: true)
+ budget: budget,
+ valuators: [valuator],
+ valuation_finished: true)
render_inline Valuation::Budgets::RowComponent.new(budget: budget)
diff --git a/spec/controllers/admin/poll/questions/answers/videos_controller_spec.rb b/spec/controllers/admin/poll/questions/answers/videos_controller_spec.rb
index 65c5dc1f8..6a2e7bcf4 100644
--- a/spec/controllers/admin/poll/questions/answers/videos_controller_spec.rb
+++ b/spec/controllers/admin/poll/questions/answers/videos_controller_spec.rb
@@ -8,10 +8,10 @@ describe Admin::Poll::Questions::Answers::VideosController, :admin do
it "is not possible for an already started poll" do
post :create, params: {
poll_question_answer_video: {
- title: "Video from started poll",
- url: "https://www.youtube.com/watch?v=-JMf43st-1A"
- },
- answer_id: current_answer
+ title: "Video from started poll",
+ url: "https://www.youtube.com/watch?v=-JMf43st-1A"
+ },
+ answer_id: current_answer
}
expect(flash[:alert]).to eq "You do not have permission to carry out the action 'create' on Video."
@@ -21,8 +21,8 @@ describe Admin::Poll::Questions::Answers::VideosController, :admin do
it "is possible for a not started poll" do
post :create, params: {
poll_question_answer_video: {
- title: "Video from not started poll",
- url: "https://www.youtube.com/watch?v=-JMf43st-1A"
+ title: "Video from not started poll",
+ url: "https://www.youtube.com/watch?v=-JMf43st-1A"
},
answer_id: future_answer
}
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb
index 33aaf7047..dc7421110 100644
--- a/spec/controllers/comments_controller_spec.rb
+++ b/spec/controllers/comments_controller_spec.rb
@@ -4,7 +4,7 @@ describe CommentsController do
describe "POST create" do
let(:legal_process) do
create(:legislation_process, debate_start_date: Date.current - 3.days,
- debate_end_date: Date.current + 2.days)
+ debate_end_date: Date.current + 2.days)
end
let(:question) { create(:legislation_question, process: legal_process, title: "Question 1") }
let(:user) { create(:user, :level_two) }
@@ -53,13 +53,13 @@ describe CommentsController do
expect do
post :create, xhr: true,
- params: {
- comment: {
- commentable_id: annotation.id,
- commentable_type: "Legislation::Annotation",
- body: "a comment"
- }
- }
+ params: {
+ comment: {
+ commentable_id: annotation.id,
+ commentable_type: "Legislation::Annotation",
+ body: "a comment"
+ }
+ }
end.not_to change { annotation.reload.comments_count }
end
diff --git a/spec/controllers/legislation/annotations_controller_spec.rb b/spec/controllers/legislation/annotations_controller_spec.rb
index 3700c794c..575e9626d 100644
--- a/spec/controllers/legislation/annotations_controller_spec.rb
+++ b/spec/controllers/legislation/annotations_controller_spec.rb
@@ -25,7 +25,7 @@ describe Legislation::AnnotationsController do
describe "POST create" do
let(:legal_process) do
create(:legislation_process, allegations_start_date: Date.current - 3.days,
- allegations_end_date: Date.current + 2.days)
+ allegations_end_date: Date.current + 2.days)
end
let(:draft_version) do
create(:legislation_draft_version, :published, process: legal_process, title: "Version 1")
@@ -40,19 +40,19 @@ describe Legislation::AnnotationsController do
sign_in user
post :create, params: {
- process_id: legal_process.id,
- draft_version_id: draft_version.id,
- legislation_annotation: {
- "quote" => "ipsum",
- "ranges" => [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }],
- "text" => "una anotacion"
- }
- }
+ process_id: legal_process.id,
+ draft_version_id: draft_version.id,
+ legislation_annotation: {
+ "quote" => "ipsum",
+ "ranges" => [{
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }],
+ "text" => "una anotacion"
+ }
+ }
expect(Ahoy::Event.where(name: :legislation_annotation_created).count).to eq 1
expect(Ahoy::Event.last.properties["legislation_annotation_id"]).to eq Legislation::Annotation.last.id
end
@@ -61,19 +61,19 @@ describe Legislation::AnnotationsController do
sign_in user
post :create, params: {
- process_id: legal_process.id,
- draft_version_id: final_version.id,
- legislation_annotation: {
- "quote" => "ipsum",
- "ranges" => [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }],
- "text" => "una anotacion"
- }
- }
+ process_id: legal_process.id,
+ draft_version_id: final_version.id,
+ legislation_annotation: {
+ "quote" => "ipsum",
+ "ranges" => [{
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }],
+ "text" => "una anotacion"
+ }
+ }
expect(response).to have_http_status(:not_found)
end
@@ -87,14 +87,14 @@ describe Legislation::AnnotationsController do
process_id: legal_process.id,
draft_version_id: draft_version.id,
legislation_annotation: {
- "quote" => "ipsum",
+ "quote" => "ipsum",
"ranges" => [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }],
- "text" => "una anotacion"
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }],
+ "text" => "una anotacion"
}
}
end.to change { draft_version.annotations.count }.by(1)
@@ -112,11 +112,11 @@ describe Legislation::AnnotationsController do
legislation_annotation: {
"quote" => "ipsum",
"ranges" => [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }],
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }],
"text" => "una anotacion"
}
}
@@ -132,14 +132,14 @@ describe Legislation::AnnotationsController do
process_id: legal_process.id,
draft_version_id: draft_version.id,
legislation_annotation: {
- "quote" => "ipsum",
+ "quote" => "ipsum",
"ranges" => [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }].to_json,
- "text" => "una anotacion"
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }].to_json,
+ "text" => "una anotacion"
}
}
end.to change { draft_version.annotations.count }.by(1)
@@ -149,15 +149,15 @@ describe Legislation::AnnotationsController do
annotation = create(:legislation_annotation, draft_version: draft_version,
text: "my annotation",
ranges: [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }],
- range_start: "/p[1]",
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }],
+ range_start: "/p[1]",
range_start_offset: 6,
- range_end: "/p[1]",
- range_end_offset: 11)
+ range_end: "/p[1]",
+ range_end_offset: 11)
sign_in user
expect do
@@ -166,14 +166,14 @@ describe Legislation::AnnotationsController do
process_id: legal_process.id,
draft_version_id: draft_version.id,
legislation_annotation: {
- "quote" => "ipsum",
+ "quote" => "ipsum",
"ranges" => [{
- "start" => "/p[1]",
- "startOffset" => 6,
- "end" => "/p[1]",
- "endOffset" => 11
- }],
- "text" => "una anotacion"
+ "start" => "/p[1]",
+ "startOffset" => 6,
+ "end" => "/p[1]",
+ "endOffset" => 11
+ }],
+ "text" => "una anotacion"
}
}
end.not_to change { draft_version.annotations.count }
diff --git a/spec/controllers/legislation/answers_controller_spec.rb b/spec/controllers/legislation/answers_controller_spec.rb
index e05731801..04bc21dce 100644
--- a/spec/controllers/legislation/answers_controller_spec.rb
+++ b/spec/controllers/legislation/answers_controller_spec.rb
@@ -4,7 +4,7 @@ describe Legislation::AnswersController do
describe "POST create" do
let(:legal_process) do
create(:legislation_process, debate_start_date: Date.current - 3.days,
- debate_end_date: Date.current + 2.days)
+ debate_end_date: Date.current + 2.days)
end
let(:question) { create(:legislation_question, process: legal_process, title: "Question 1") }
let(:question_option) { create(:legislation_question_option, question: question, value: "Yes") }
@@ -14,12 +14,12 @@ describe Legislation::AnswersController do
sign_in user
post :create, params: {
- process_id: legal_process.id,
- question_id: question.id,
- legislation_answer: {
- legislation_question_option_id: question_option.id
- }
- }
+ process_id: legal_process.id,
+ question_id: question.id,
+ legislation_answer: {
+ legislation_question_option_id: question_option.id
+ }
+ }
expect(Ahoy::Event.where(name: :legislation_answer_created).count).to eq 1
expect(Ahoy::Event.last.properties["legislation_answer_id"]).to eq Legislation::Answer.last.id
end
diff --git a/spec/controllers/management/sessions_controller_spec.rb b/spec/controllers/management/sessions_controller_spec.rb
index ed6a32674..76e1cb4ee 100644
--- a/spec/controllers/management/sessions_controller_spec.rb
+++ b/spec/controllers/management/sessions_controller_spec.rb
@@ -16,10 +16,10 @@ describe Management::SessionsController do
allow_any_instance_of(ManagerAuthenticator).to receive(:auth).and_return(manager)
get :create, params: {
- login: "JJB033",
- clave_usuario: "31415926",
- fecha_conexion: "20151031135905"
- }
+ login: "JJB033",
+ clave_usuario: "31415926",
+ fecha_conexion: "20151031135905"
+ }
expect(response).to be_redirect
expect(session[:manager][:login]).to eq "JJB033"
end
diff --git a/spec/factories/legislations.rb b/spec/factories/legislations.rb
index 3c1dbe41b..4ae250317 100644
--- a/spec/factories/legislations.rb
+++ b/spec/factories/legislations.rb
@@ -134,7 +134,7 @@ FactoryBot.define do
|----|---------|-----|--------|
| 1 | Roberta | 39 | M |
| 2 | Oliver | 25 | F |
- BODY_MARKDOWN
+ BODY_MARKDOWN
end
end
diff --git a/spec/factories/polls.rb b/spec/factories/polls.rb
index ed493c21c..0819457b9 100644
--- a/spec/factories/polls.rb
+++ b/spec/factories/polls.rb
@@ -179,8 +179,8 @@ FactoryBot.define do
officer_assignment do
association :poll_officer_assignment,
- booth_assignment: booth_assignment,
- officer: officer || association(:poll_officer)
+ booth_assignment: booth_assignment,
+ officer: officer || association(:poll_officer)
end
end
diff --git a/spec/factories/sdg.rb b/spec/factories/sdg.rb
index 1f933eb04..7a0b9efbd 100644
--- a/spec/factories/sdg.rb
+++ b/spec/factories/sdg.rb
@@ -22,7 +22,7 @@ FactoryBot.define do
factory :sdg_review, class: "SDG::Review" do
SDG::Related::RELATABLE_TYPES.map { |relatable_type| relatable_type.downcase.gsub("::", "_") }
- .each do |relatable|
+ .each do |relatable|
trait :"#{relatable}_review" do
association :relatable, factory: relatable
end
diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb
index 0d8c5a0c2..41bc9fc28 100644
--- a/spec/i18n_spec.rb
+++ b/spec/i18n_spec.rb
@@ -8,12 +8,12 @@ describe "I18n" do
it "does not have missing keys" do
expect(missing_keys).to be_empty,
- "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
+ "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
end
it "does not have unused keys" do
expect(unused_keys).to be_empty,
- "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
+ "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
end
context "Plurals" do
diff --git a/spec/lib/remote_census_api_spec.rb b/spec/lib/remote_census_api_spec.rb
index 616dfdce5..151eac9cb 100644
--- a/spec/lib/remote_census_api_spec.rb
+++ b/spec/lib/remote_census_api_spec.rb
@@ -36,7 +36,7 @@ describe RemoteCensusApi do
params = {
"document_type" => "1",
"date_of_birth" => "1980-12-31",
- "postal_code" => "28013"
+ "postal_code" => "28013"
}
savon.expects(:verify_residence)
@@ -79,8 +79,8 @@ describe RemoteCensusApi do
params = {
"document_type" => "1",
"date_of_birth" => "1980-12-31",
- "postal_code" => "28013",
- "api_key" => "your_api_key"
+ "postal_code" => "28013",
+ "api_key" => "your_api_key"
}
savon.expects(:verify_residence)
diff --git a/spec/lib/remote_translations/caller_spec.rb b/spec/lib/remote_translations/caller_spec.rb
index b24307cb9..76bc49695 100644
--- a/spec/lib/remote_translations/caller_spec.rb
+++ b/spec/lib/remote_translations/caller_spec.rb
@@ -220,8 +220,8 @@ describe RemoteTranslations::Caller, :remote_translations do
locale = remote_translation.locale
fake_response = ["translated title", "translated description", "translated summary", nil]
- expect_any_instance_of(client).to receive(:call).with(field_values_sanitized, locale).
- and_return(fake_response)
+ expect_any_instance_of(client).to receive(:call).with(field_values_sanitized, locale)
+ .and_return(fake_response)
caller.call
end
diff --git a/spec/lib/remote_translations/microsoft/client_spec.rb b/spec/lib/remote_translations/microsoft/client_spec.rb
index 903a2ad21..0b9b4c731 100644
--- a/spec/lib/remote_translations/microsoft/client_spec.rb
+++ b/spec/lib/remote_translations/microsoft/client_spec.rb
@@ -62,13 +62,13 @@ describe RemoteTranslations::Microsoft::Client do
response_end_text = [end_translated_text_es]
expect_any_instance_of(BingTranslator).to receive(:translate_array).with([start_text_en], to: :es)
- .exactly(1)
- .times
- .and_return(response_start_text)
+ .exactly(1)
+ .times
+ .and_return(response_start_text)
expect_any_instance_of(BingTranslator).to receive(:translate_array).with([end_text_en], to: :es)
- .exactly(1)
- .times
- .and_return(response_end_text)
+ .exactly(1)
+ .times
+ .and_return(response_end_text)
start_another_text_en = Faker::Lorem.characters(number: 12) + "."
end_another_text_en = Faker::Lorem.characters(number: 12)
@@ -81,13 +81,13 @@ describe RemoteTranslations::Microsoft::Client do
response_another_end_text = [another_end_translated_text_es]
expect_any_instance_of(BingTranslator).to receive(:translate_array).with([start_another_text_en], to: :es)
- .exactly(1)
- .times
- .and_return(response_another_start_text)
+ .exactly(1)
+ .times
+ .and_return(response_another_start_text)
expect_any_instance_of(BingTranslator).to receive(:translate_array).with([end_another_text_en], to: :es)
- .exactly(1)
- .times
- .and_return(response_another_end_text)
+ .exactly(1)
+ .times
+ .and_return(response_another_end_text)
result = client.call([text_en, another_text_en], :es)
diff --git a/spec/lib/tasks/seed_spec.rb b/spec/lib/tasks/seed_spec.rb
index c7cad5ff0..d739dc9ed 100644
--- a/spec/lib/tasks/seed_spec.rb
+++ b/spec/lib/tasks/seed_spec.rb
@@ -5,13 +5,15 @@ describe "rake db:seed" do
default_locales = I18n.available_locales
begin
I18n.available_locales = [:ar, :bg, :bs, :ca, :cs, :da, :de, :el, :en, :es, :"es-PE", :eu, :fa, :fr,
- :gl, :he, :hr, :id, :it, :ka, :nl, :oc, :pl, :"pt-BR",
- :ro, :ru, :sl, :sq, :so, :sr, :sv, :tr, :val, :"zh-CN", :"zh-TW"]
+ :gl, :he, :hr, :id, :it, :ka, :nl, :oc, :pl, :"pt-BR",
+ :ro, :ru, :sl, :sq, :so, :sr, :sv, :tr, :val, :"zh-CN", :"zh-TW"]
SiteCustomization::Page.destroy_all
load Rails.root.join("db", "pages.rb")
- paths = { accessibility: "pages.accessibility.title", conditions: "pages.conditions.title",
- faq: "pages.help.faq.page.title", privacy: "pages.privacy.title",
+ paths = { accessibility: "pages.accessibility.title",
+ conditions: "pages.conditions.title",
+ faq: "pages.help.faq.page.title",
+ privacy: "pages.privacy.title",
welcome_not_verified: "welcome.welcome.title",
welcome_level_two_verified: "welcome.welcome.title",
welcome_level_three_verified: "welcome.welcome.title" }
diff --git a/spec/mailers/dashboard/mailer_spec.rb b/spec/mailers/dashboard/mailer_spec.rb
index 5cc59d23c..c3515c00a 100644
--- a/spec/mailers/dashboard/mailer_spec.rb
+++ b/spec/mailers/dashboard/mailer_spec.rb
@@ -73,36 +73,36 @@ describe Dashboard::Mailer do
expect(email).to deliver_to(proposal.author)
expect(email).to have_subject("Your draft citizen proposal is created")
expect(email).to have_body_text("Hi #{proposal.author.name}!")
- expect(email).to have_body_text("Your #{proposal.title} proposal has been "\
+ expect(email).to have_body_text("Your #{proposal.title} proposal has been " \
"successfully created.")
- expect(email).to have_body_text("Take advantage that your proposal is not public yet and "\
+ expect(email).to have_body_text("Take advantage that your proposal is not public yet and " \
"get ready to contact a lot of people.")
expect(email).to have_body_text("When you are ready publish your citizen proposal from this")
expect(email).to have_link "link", href: proposal_dashboard_url(proposal)
- expect(email).to have_body_text("We know that creating a proposal with a hook and getting "\
- "the necessary support can seem complicated. But don't "\
+ expect(email).to have_body_text("We know that creating a proposal with a hook and getting " \
+ "the necessary support can seem complicated. But don't " \
"worry because we are going to help you!")
- expect(email).to have_body_text("You have a tool that will be your new best ally: "\
+ expect(email).to have_body_text("You have a tool that will be your new best ally: " \
"The Citizen Proposals panel.")
- expect(email).to have_body_text("Enter every day in the panel of your proposal to use the "\
+ expect(email).to have_body_text("Enter every day in the panel of your proposal to use the " \
"tips and resources that we will share with you.")
- expect(email).to have_body_text("These tips, actions and resources will give you ideas and "\
- "also practical solutions to get more support and a wider "\
+ expect(email).to have_body_text("These tips, actions and resources will give you ideas and " \
+ "also practical solutions to get more support and a wider " \
"community. Dont forget them!")
- expect(email).to have_body_text("As you gain more support, you will unlock new and better "\
- "resources. At the moment, you have an e-mail template to "\
- "send massively to all your contacts, a poster to print, "\
- "among other features and rewards that you will discover. "\
- "Dont stop adding support and we will not stop rewarding "\
+ expect(email).to have_body_text("As you gain more support, you will unlock new and better " \
+ "resources. At the moment, you have an e-mail template to " \
+ "send massively to all your contacts, a poster to print, " \
+ "among other features and rewards that you will discover. " \
+ "Dont stop adding support and we will not stop rewarding " \
"and helping you!")
- expect(email).to have_body_text("You have #{Setting["months_to_archive_proposals"]} months "\
- "since you publish the proposal to get "\
- "#{Setting["votes_for_proposal_success"]} support and your "\
- "proposal can become a reality. But the first days are the "\
+ expect(email).to have_body_text("You have #{Setting["months_to_archive_proposals"]} months " \
+ "since you publish the proposal to get " \
+ "#{Setting["votes_for_proposal_success"]} support and your " \
+ "proposal can become a reality. But the first days are the " \
"most important. It is a challenge. Get ready!")
expect(email).to have_body_text("And for you to start with all the motivation,")
- expect(email).to have_body_text("here you have several resources and a whole list of "\
- "tips that will come to you every day to prepare the "\
+ expect(email).to have_body_text("here you have several resources and a whole list of " \
+ "tips that will come to you every day to prepare the " \
"broadcast!")
expect(email).to have_body_text("Go ahead, discover them!")
end
@@ -135,33 +135,33 @@ describe Dashboard::Mailer do
expect(email).to deliver_from("CONSUL ")
expect(email).to deliver_to(proposal.author)
- expect(email).to have_subject("Your citizen proposal is already "\
+ expect(email).to have_subject("Your citizen proposal is already " \
"published. Don't stop spreading!")
- expect(email).to have_body_text("Congratulations #{proposal.author.name}! Your proposal "\
+ expect(email).to have_body_text("Congratulations #{proposal.author.name}! Your proposal " \
"#{proposal.title} has been created successfully.")
expect(email).to have_body_text("And now, go for your first 100 supports!")
expect(email).to have_body_text("Why 100?")
- expect(email).to have_body_text("Our experience tells us that the first day is fundamental. "\
- "Because in addition to having the energy to launch "\
- "something new, being a newly published proposal, you will "\
- "have the important visibility of being among the new "\
+ expect(email).to have_body_text("Our experience tells us that the first day is fundamental. " \
+ "Because in addition to having the energy to launch " \
+ "something new, being a newly published proposal, you will " \
+ "have the important visibility of being among the new " \
"proposals highlighted.")
- expect(email).to have_body_text("Get 100 supports on the first day, and you will have "\
+ expect(email).to have_body_text("Get 100 supports on the first day, and you will have " \
"a first community to back you up.")
- expect(email).to have_body_text("That is why we challenge you to get it, but not without "\
+ expect(email).to have_body_text("That is why we challenge you to get it, but not without " \
"a lot of help!")
- expect(email).to have_body_text("Remember that in your Proposal Panel you have new "\
- "resources available and recommendations for "\
+ expect(email).to have_body_text("Remember that in your Proposal Panel you have new " \
+ "resources available and recommendations for " \
"dissemination actions.")
- expect(email).to have_body_text("Come in every day to see your progress and use the tips "\
- "and resources we will share with you. They are ideas and "\
+ expect(email).to have_body_text("Come in every day to see your progress and use the tips " \
+ "and resources we will share with you. They are ideas and " \
"also practical solutions to get the support you need.")
- expect(email).to have_body_text("As you get more support, you will unlock new and better "\
- "resources. Do not stop adding support and we will not stop "\
+ expect(email).to have_body_text("As you get more support, you will unlock new and better " \
+ "resources. Do not stop adding support and we will not stop " \
"rewarding and helping you!")
expect(email).to have_body_text("And for you to start at full speed...")
expect(email).to have_body_text("Here is a great resource at your disposal!")
- expect(email).to have_body_text("You will also find this new recommended dissemination "\
+ expect(email).to have_body_text("You will also find this new recommended dissemination " \
"action...")
expect(email).to have_body_text("You sure have more resources to use!")
expect(email).to have_body_text("Go ahead, discover them!")
diff --git a/spec/models/budget/ballot/line_spec.rb b/spec/models/budget/ballot/line_spec.rb
index 329b48e38..d89fcb01d 100644
--- a/spec/models/budget/ballot/line_spec.rb
+++ b/spec/models/budget/ballot/line_spec.rb
@@ -52,7 +52,7 @@ describe Budget::Ballot::Line do
it "is not valid if there are no votes left" do
create(:budget_ballot_line, ballot: ballot,
- investment: create(:budget_investment, :selected, heading: heading))
+ investment: create(:budget_investment, :selected, heading: heading))
expect(ballot_line).not_to be_valid
end
diff --git a/spec/models/budget/heading_spec.rb b/spec/models/budget/heading_spec.rb
index 185b88084..25d8646c2 100644
--- a/spec/models/budget/heading_spec.rb
+++ b/spec/models/budget/heading_spec.rb
@@ -223,7 +223,7 @@ describe Budget::Heading do
it "Allows longitude inside [-180,180] interval" do
heading = create(:budget_heading, group: group,
- name: "Longitude is inside [-180,180] interval")
+ name: "Longitude is inside [-180,180] interval")
heading.longitude = "180"
expect(heading).to be_valid
diff --git a/spec/models/budget/phase_spec.rb b/spec/models/budget/phase_spec.rb
index 9342f3d22..0e13d11ab 100644
--- a/spec/models/budget/phase_spec.rb
+++ b/spec/models/budget/phase_spec.rb
@@ -175,8 +175,8 @@ describe Budget::Phase do
describe "when being enabled" do
before do
accepting_phase.update!(enabled: false,
- starts_at: Date.current,
- ends_at: Date.current + 2.days)
+ starts_at: Date.current,
+ ends_at: Date.current + 2.days)
end
it "adjusts previous enabled phase end date to its own start date" do
@@ -211,16 +211,16 @@ describe Budget::Phase do
it "doesn't adjust previous enabled phase end date to its own start date" do
expect do
accepting_phase.update(enabled: false,
- starts_at: Date.current,
- ends_at: Date.current + 2.days)
+ starts_at: Date.current,
+ ends_at: Date.current + 2.days)
end.not_to change { prev_enabled_phase.ends_at }
end
it "adjusts next enabled phase start date to its own start date" do
expect do
accepting_phase.update(enabled: false,
- starts_at: Date.current,
- ends_at: Date.current + 2.days)
+ starts_at: Date.current,
+ ends_at: Date.current + 2.days)
end.to change { next_enabled_phase.starts_at.to_date }.to(Date.current)
end
end
diff --git a/spec/models/budget/stats_spec.rb b/spec/models/budget/stats_spec.rb
index c80aff929..476969876 100644
--- a/spec/models/budget/stats_spec.rb
+++ b/spec/models/budget/stats_spec.rb
@@ -77,8 +77,7 @@ describe Budget::Stats do
it "doesn't count nil user ids" do
create(:budget_ballot_line, investment: investment,
- ballot: create(:budget_ballot, budget: budget.reload, user: nil, physical: true)
- )
+ ballot: create(:budget_ballot, budget: budget.reload, user: nil, physical: true))
expect(stats.total_participants_vote_phase).to be 0
end
diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb
index f98c86172..e5302665b 100644
--- a/spec/models/comment_spec.rb
+++ b/spec/models/comment_spec.rb
@@ -101,23 +101,23 @@ describe Comment do
it "expires cache when the author is hidden" do
expect { comment.user.hide }
- .to change { [comment.reload.cache_version, comment.author.cache_version] }
+ .to change { [comment.reload.cache_version, comment.author.cache_version] }
end
it "expires cache when the author is erased" do
expect { comment.user.erase }
- .to change { [comment.reload.cache_version, comment.author.cache_version] }
+ .to change { [comment.reload.cache_version, comment.author.cache_version] }
end
it "expires cache when the author changes" do
expect { comment.user.update(username: "Isabel") }
- .to change { [comment.reload.cache_version, comment.author.cache_version] }
+ .to change { [comment.reload.cache_version, comment.author.cache_version] }
end
it "expires cache when the author's organization get verified" do
create(:organization, user: comment.user)
expect { comment.user.organization.verify }
- .to change { [comment.reload.cache_version, comment.author.cache_version] }
+ .to change { [comment.reload.cache_version, comment.author.cache_version] }
end
end
diff --git a/spec/models/dashboard/action_spec.rb b/spec/models/dashboard/action_spec.rb
index 5364ff64c..5a10ffdd4 100644
--- a/spec/models/dashboard/action_spec.rb
+++ b/spec/models/dashboard/action_spec.rb
@@ -290,9 +290,9 @@ describe Dashboard::Action do
it "when proposal has been created today and day_offset is valid only for today" do
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).to include(resource.id)
+ proposal)).to include(resource.id)
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).to include(action.id)
+ proposal)).to include(action.id)
end
it "when proposal has received a new vote today" do
@@ -302,9 +302,9 @@ describe Dashboard::Action do
create(:vote, voter: proposal.author, votable: proposal)
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).to include(action.id)
+ proposal)).to include(action.id)
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).not_to include(resource.id)
+ proposal)).not_to include(resource.id)
end
end
@@ -321,9 +321,9 @@ describe Dashboard::Action do
it "when day_offset field is valid for today and invalid for yesterday" do
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).to include(resource.id)
+ proposal)).to include(resource.id)
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).to include(action.id)
+ proposal)).to include(action.id)
end
it "when proposal has received a new vote today" do
@@ -333,9 +333,9 @@ describe Dashboard::Action do
create(:vote, voter: proposal.author, votable: proposal)
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).to include(action.id)
+ proposal)).to include(action.id)
expect(Dashboard::Action.detect_new_actions_since(Date.yesterday,
- proposal)).not_to include(resource.id)
+ proposal)).not_to include(resource.id)
end
end
end
diff --git a/spec/models/debate_spec.rb b/spec/models/debate_spec.rb
index 4b5564955..68270198d 100644
--- a/spec/models/debate_spec.rb
+++ b/spec/models/debate_spec.rb
@@ -376,23 +376,23 @@ describe Debate do
it "expires cache when the author is hidden" do
expect { debate.author.hide }
- .to change { [debate.reload.cache_version, debate.author.cache_version] }
+ .to change { [debate.reload.cache_version, debate.author.cache_version] }
end
it "expires cache when the author is erased" do
expect { debate.author.erase }
- .to change { [debate.reload.cache_version, debate.author.cache_version] }
+ .to change { [debate.reload.cache_version, debate.author.cache_version] }
end
it "expires cache when its author changes" do
expect { debate.author.update(username: "Eva") }
- .to change { [debate.reload.cache_version, debate.author.cache_version] }
+ .to change { [debate.reload.cache_version, debate.author.cache_version] }
end
it "expires cache when the author's organization get verified" do
create(:organization, user: debate.author)
expect { debate.author.organization.verify }
- .to change { [debate.reload.cache_version, debate.author.cache_version] }
+ .to change { [debate.reload.cache_version, debate.author.cache_version] }
end
end
diff --git a/spec/models/geozone_spec.rb b/spec/models/geozone_spec.rb
index 65c269610..c2b441f10 100644
--- a/spec/models/geozone_spec.rb
+++ b/spec/models/geozone_spec.rb
@@ -73,7 +73,8 @@ describe Geozone do
expect(geozone.outline_points).to eq(
[[-3.9259027239257, 40.8792937308316],
[-3.9249047078766, 40.8788966596619],
- [-3.9247799675785, 40.8789131852224]])
+ [-3.9247799675785, 40.8789131852224]]
+ )
end
end
end
diff --git a/spec/models/legislation/annotation_spec.rb b/spec/models/legislation/annotation_spec.rb
index 965eac3e8..f0ac81a2e 100644
--- a/spec/models/legislation/annotation_spec.rb
+++ b/spec/models/legislation/annotation_spec.rb
@@ -10,100 +10,103 @@ RSpec.describe Legislation::Annotation, type: :model do
end
it "calculates the context for multinode annotations" do
- quote = "ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam"\
- " erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex"\
- " ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum"\
- " dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril"\
- " delenit augue duis dolore te feugait nulla facilisi."\
- "\n\n"\
- "Expetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi"\
- " tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis"\
- " ea. Per ne impedit iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id."\
- "\n\n"\
+ quote = "ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam" \
+ " erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex" \
+ " ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum" \
+ " dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril" \
+ " delenit augue duis dolore te feugait nulla facilisi." \
+ "\n\n" \
+ "Expetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi" \
+ " tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis" \
+ " ea. Per ne impedit iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id." \
+ "\n\n" \
"His audiam"
- annotation = create(:legislation_annotation,
+ annotation = create(
+ :legislation_annotation,
draft_version: draft_version,
quote: quote,
ranges: [{ "start" => "/p[1]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }]
)
- context = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt"\
- " ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper"\
- " suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit"\
- " esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui"\
- " blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nExpetenda tincidunt in sed, ex"\
- " partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute"\
- " aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit"\
- " iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id.\n\nHis audiamdeserunt in, eum"\
- " ubique voluptatibus te. In reque dicta usu. Ne rebum dissentiet eam, vim omnis deseruisse id. Ullum deleniti vituperata at"\
- " quo, insolens complectitur te eos, ea pri dico munere propriae. Vel ferri facilis ut, qui paulo ridens praesent ad. Possim"\
+ context = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt" \
+ " ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper" \
+ " suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit" \
+ " esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui" \
+ " blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nExpetenda tincidunt in sed, ex" \
+ " partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute" \
+ " aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit" \
+ " iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id.\n\nHis audiamdeserunt in, eum" \
+ " ubique voluptatibus te. In reque dicta usu. Ne rebum dissentiet eam, vim omnis deseruisse id. Ullum deleniti vituperata at" \
+ " quo, insolens complectitur te eos, ea pri dico munere propriae. Vel ferri facilis ut, qui paulo ridens praesent ad. Possim" \
" alterum qui cu. Accusamus consulatu ius te, cu decore soleat appareat usu."
expect(annotation.context).to eq(context)
end
it "calculates the context for multinode annotations 2" do
- quote = "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla"\
- " facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore"\
- " te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant"\
+ quote = "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla" \
+ " facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore" \
+ " te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant" \
" aeterno interesset at. Usu ea mundi tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo"
- annotation = create(:legislation_annotation,
+ annotation = create(
+ :legislation_annotation,
draft_version: draft_version,
quote: quote,
ranges: [{ "start" => "/p[1]", "startOffset" => 273, "end" => "/p[2]", "endOffset" => 190 }]
)
- context = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna"\
- " aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut"\
- " aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit"\
- " esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui"\
- " blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex"\
- " partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute"\
- " aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit"\
+ context = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna" \
+ " aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut" \
+ " aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit" \
+ " esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui" \
+ " blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex" \
+ " partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute" \
+ " aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit" \
" iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id."
expect(annotation.context).to eq(context)
end
it "calculates the context for multinode annotations 3" do
- body = "The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed"\
- " to ensure cooperation with the community in the case of network server software.\r\n\r\nThe licenses for most software and"\
- " other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public"\
- " Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free"\
- " software for all its users.\r\n\r\nWhen we speak of free software, we are referring to freedom, not price. Our General"\
- " Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for"\
- " them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces"\
- " of it in new free programs, and that you know you can do these things.\r\n\r\nDevelopers that use our General Public Licenses"\
- " protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you"\
- " legal permission to copy, distribute and/or modify the software.\r\n\r\nA secondary benefit of defending all users' freedom"\
- " is that improvements made in alternate versions of the program, if they receive widespread use, become available for other"\
- " developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation."\
- " However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License"\
- " permits making a modified version and letting the public access it on a server without ever releasing its source code to the"\
- " public.\r\n\r\nThe GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified"\
- " source code becomes available to the community. It requires the operator of a network server to provide the source code of"\
- " the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly"\
- " accessible server, gives the public access to the source code of the modified version.\r\n\r\nAn older license, called the"\
- " Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license,"\
- " not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this"\
+ body = "The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed" \
+ " to ensure cooperation with the community in the case of network server software.\r\n\r\nThe licenses for most software and" \
+ " other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public" \
+ " Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free" \
+ " software for all its users.\r\n\r\nWhen we speak of free software, we are referring to freedom, not price. Our General" \
+ " Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for" \
+ " them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces" \
+ " of it in new free programs, and that you know you can do these things.\r\n\r\nDevelopers that use our General Public Licenses" \
+ " protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you" \
+ " legal permission to copy, distribute and/or modify the software.\r\n\r\nA secondary benefit of defending all users' freedom" \
+ " is that improvements made in alternate versions of the program, if they receive widespread use, become available for other" \
+ " developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation." \
+ " However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License" \
+ " permits making a modified version and letting the public access it on a server without ever releasing its source code to the" \
+ " public.\r\n\r\nThe GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified" \
+ " source code becomes available to the community. It requires the operator of a network server to provide the source code of" \
+ " the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly" \
+ " accessible server, gives the public access to the source code of the modified version.\r\n\r\nAn older license, called the" \
+ " Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license," \
+ " not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this" \
" license."
draft_version = create(:legislation_draft_version, body: body)
- quote = "By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a"\
- " program--to make sure it remains free software for all its users.\r\n\r\nWhen we speak of free software, we are referring to"\
- " freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of"\
+ quote = "By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a" \
+ " program--to make sure it remains free software for all its users.\r\n\r\nWhen we speak of free software, we are referring to" \
+ " freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of" \
" free software (and charge for them if you wish)"
- annotation = create(:legislation_annotation,
+ annotation = create(
+ :legislation_annotation,
draft_version: draft_version,
quote: quote,
ranges: [{ "start" => "/p[2]", "startOffset" => 127, "end" => "/p[3]", "endOffset" => 223 }]
)
- context = "The licenses for most software and other practical works are designed to take away your freedom to share and change the"\
- " works. By contrast, our General Public Licenses are intended to guarantee your freedom to share"\
- " and change all versions of a program--to make sure it remains free software for all its users.\r\n\r\nWhen we speak of"\
- " free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have"\
- " the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code"\
- " or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know"\
+ context = "The licenses for most software and other practical works are designed to take away your freedom to share and change the" \
+ " works. By contrast, our General Public Licenses are intended to guarantee your freedom to share" \
+ " and change all versions of a program--to make sure it remains free software for all its users.\r\n\r\nWhen we speak of" \
+ " free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have" \
+ " the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code" \
+ " or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know" \
" you can do these things."
expect(annotation.context).to eq(context)
diff --git a/spec/models/legislation/process/phase_spec.rb b/spec/models/legislation/process/phase_spec.rb
index 2fc17862a..c51f0a998 100644
--- a/spec/models/legislation/process/phase_spec.rb
+++ b/spec/models/legislation/process/phase_spec.rb
@@ -37,7 +37,7 @@ RSpec.describe Legislation::Process::Phase, type: :model do
# started
process.update!(debate_start_date: Date.current - 2.days,
- debate_end_date: Date.current + 1.day)
+ debate_end_date: Date.current + 1.day)
expect(process.debate_phase.started?).to be true
# starts today
diff --git a/spec/models/legislation/process_spec.rb b/spec/models/legislation/process_spec.rb
index 5f0e2999c..dde6408b2 100644
--- a/spec/models/legislation/process_spec.rb
+++ b/spec/models/legislation/process_spec.rb
@@ -181,7 +181,7 @@ describe Legislation::Process do
debate_end_date: Date.current - 1.day)
expect(process).to be_invalid
expect(process.errors.messages[:debate_end_date])
- .to include("must be on or after the debate start date")
+ .to include("must be on or after the debate start date")
end
it "is valid if draft_end_date is the same as draft_start_date" do
@@ -195,7 +195,7 @@ describe Legislation::Process do
draft_end_date: Date.current - 1.day)
expect(process).to be_invalid
expect(process.errors.messages[:draft_end_date])
- .to include("must be on or after the draft start date")
+ .to include("must be on or after the draft start date")
end
it "is invalid if allegations_end_date is before allegations_start_date" do
@@ -203,12 +203,12 @@ describe Legislation::Process do
allegations_end_date: Date.current - 1.day)
expect(process).to be_invalid
expect(process.errors.messages[:allegations_end_date])
- .to include("must be on or after the comments start date")
+ .to include("must be on or after the comments start date")
end
it "is valid if allegations_end_date is the same as allegations_start_date" do
process = build(:legislation_process, allegations_start_date: Date.current - 1.day,
- allegations_end_date: Date.current - 1.day)
+ allegations_end_date: Date.current - 1.day)
expect(process).to be_valid
end
end
diff --git a/spec/models/local_census_record_spec.rb b/spec/models/local_census_record_spec.rb
index 4cf88a19e..30d4dfd76 100644
--- a/spec/models/local_census_record_spec.rb
+++ b/spec/models/local_census_record_spec.rb
@@ -41,7 +41,7 @@ describe LocalCensusRecord do
it "is not valid when a record already exists with same document_number and document_type" do
create(:local_census_record, document_number: "#DOC_NUMBER", document_type: "1")
local_census_record = build(:local_census_record, document_number: "#DOC_NUMBER",
- document_type: "1")
+ document_type: "1")
expect(local_census_record).not_to be_valid
end
diff --git a/spec/models/local_census_records/import_spec.rb b/spec/models/local_census_records/import_spec.rb
index 7a97f0df5..67a04cdf6 100644
--- a/spec/models/local_census_records/import_spec.rb
+++ b/spec/models/local_census_records/import_spec.rb
@@ -72,7 +72,7 @@ describe LocalCensusRecords::Import do
invalid_records_document_types = [nil, "1", "2", "3", "DNI"]
invalid_records_document_numbers = ["44556678T", nil, "22556678T", "X11556678", "Z11556678"]
invalid_records_date_of_births = [Date.parse("07/08/1984"), Date.parse("07/08/1985"), nil,
- Date.parse("07/08/1987"), Date.parse("07/08/1987")]
+ Date.parse("07/08/1987"), Date.parse("07/08/1987")]
invalid_records_postal_codes = ["7008", "7009", "7010", nil, "7011"]
expect(import.invalid_records.map(&:document_type))
.to eq(invalid_records_document_types)
@@ -81,7 +81,7 @@ describe LocalCensusRecords::Import do
expect(import.invalid_records.map(&:date_of_birth))
.to eq(invalid_records_date_of_births)
expect(import.invalid_records.map(&:postal_code))
- .to eq(invalid_records_postal_codes)
+ .to eq(invalid_records_postal_codes)
end
end
end
diff --git a/spec/models/machine_learning_spec.rb b/spec/models/machine_learning_spec.rb
index f3f8af8f7..1a0dd1735 100644
--- a/spec/models/machine_learning_spec.rb
+++ b/spec/models/machine_learning_spec.rb
@@ -522,17 +522,23 @@ describe MachineLearning do
machine_learning = MachineLearning.new(job)
tags_data = [
- { id: 0,
- name: "Existing tag" },
- { id: 1,
- name: "Machine learning tag" }
+ {
+ id: 0,
+ name: "Existing tag"
+ },
+ {
+ id: 1,
+ name: "Machine learning tag"
+ }
]
taggings_data = [
- { tag_id: 0,
+ {
+ tag_id: 0,
taggable_id: proposal.id
},
- { tag_id: 1,
+ {
+ tag_id: 1,
taggable_id: proposal.id
}
]
@@ -564,17 +570,23 @@ describe MachineLearning do
machine_learning = MachineLearning.new(job)
tags_data = [
- { id: 0,
- name: "Existing tag" },
- { id: 1,
- name: "Machine learning tag" }
+ {
+ id: 0,
+ name: "Existing tag"
+ },
+ {
+ id: 1,
+ name: "Machine learning tag"
+ }
]
taggings_data = [
- { tag_id: 0,
+ {
+ tag_id: 0,
taggable_id: investment.id
},
- { tag_id: 1,
+ {
+ tag_id: 1,
taggable_id: investment.id
}
]
diff --git a/spec/models/officing/residence_spec.rb b/spec/models/officing/residence_spec.rb
index 621e24ab8..96df02b1d 100644
--- a/spec/models/officing/residence_spec.rb
+++ b/spec/models/officing/residence_spec.rb
@@ -85,8 +85,8 @@ describe Officing::Residence do
describe "dates" do
it "is not valid but not because date of birth" do
custom_residence = Officing::Residence.new("date_of_birth(3i)" => "1",
- "date_of_birth(2i)" => "1",
- "date_of_birth(1i)" => "1980")
+ "date_of_birth(2i)" => "1",
+ "date_of_birth(1i)" => "1980")
expect(custom_residence).not_to be_valid
expect(custom_residence.errors[:date_of_birth]).to be_empty
@@ -94,8 +94,8 @@ describe Officing::Residence do
it "is not valid without a date of birth" do
custom_residence = Officing::Residence.new("date_of_birth(3i)" => "",
- "date_of_birth(2i)" => "",
- "date_of_birth(1i)" => "")
+ "date_of_birth(2i)" => "",
+ "date_of_birth(1i)" => "")
expect(custom_residence).not_to be_valid
expect(custom_residence.errors[:date_of_birth]).to include("can't be blank")
end
@@ -117,10 +117,10 @@ describe Officing::Residence do
expect(FailedCensusCall.count).to eq(1)
expect(FailedCensusCall.first).to have_attributes(
- user_id: residence.user.id,
+ user_id: residence.user.id,
poll_officer_id: residence.officer.id,
document_number: "12345678Z",
- document_type: "1",
+ document_type: "1",
date_of_birth: nil,
postal_code: "00001",
year_of_birth: Time.current.year
@@ -209,13 +209,13 @@ describe Officing::Residence do
expect(FailedCensusCall.count).to eq(1)
expect(FailedCensusCall.first).to have_attributes(
- user_id: residence.user.id,
+ user_id: residence.user.id,
poll_officer_id: residence.officer.id,
document_number: "12345678Z",
- document_type: "1",
+ document_type: "1",
date_of_birth: nil,
postal_code: nil,
- year_of_birth: Time.current.year
+ year_of_birth: Time.current.year
)
end
end
diff --git a/spec/models/poll/ballot_sheet_spec.rb b/spec/models/poll/ballot_sheet_spec.rb
index 12a834457..73cd46e45 100644
--- a/spec/models/poll/ballot_sheet_spec.rb
+++ b/spec/models/poll/ballot_sheet_spec.rb
@@ -6,8 +6,8 @@ describe Poll::BallotSheet do
investment1 = create(:budget_investment, budget: budget)
investment2 = create(:budget_investment, budget: budget)
build(:poll_ballot_sheet, poll: create(:poll, budget: budget),
- officer_assignment: create(:poll_officer_assignment),
- data: "#{investment1.id};#{investment2.id}")
+ officer_assignment: create(:poll_officer_assignment),
+ data: "#{investment1.id};#{investment2.id}")
end
context "Validations" do
diff --git a/spec/models/poll/poll_spec.rb b/spec/models/poll/poll_spec.rb
index 00f97602e..609227073 100644
--- a/spec/models/poll/poll_spec.rb
+++ b/spec/models/poll/poll_spec.rb
@@ -104,45 +104,52 @@ describe Poll do
it "is valid when overlapping but different proposals" do
other_proposal = create(:proposal)
- _other_poll = create(:poll, related: other_proposal, starts_at: poll.starts_at,
- ends_at: poll.ends_at)
+ _other_poll = create(:poll, related: other_proposal,
+ starts_at: poll.starts_at,
+ ends_at: poll.ends_at)
expect(poll).to be_valid
end
it "is valid when same proposal but not overlapping" do
- _other_poll = create(:poll, related: proposal, starts_at: poll.ends_at + 1.day,
- ends_at: poll.ends_at + 8.days)
+ _other_poll = create(:poll, related: proposal,
+ starts_at: poll.ends_at + 1.day,
+ ends_at: poll.ends_at + 8.days)
expect(poll).to be_valid
end
it "is not valid when overlaps from the beginning" do
- _other_poll = create(:poll, related: proposal, starts_at: poll.starts_at - 8.days,
- ends_at: poll.starts_at)
+ _other_poll = create(:poll, related: proposal,
+ starts_at: poll.starts_at - 8.days,
+ ends_at: poll.starts_at)
expect(poll).not_to be_valid
end
it "is not valid when overlaps from the end" do
- _other_poll = create(:poll, related: proposal, starts_at: poll.ends_at,
- ends_at: poll.ends_at + 8.days)
+ _other_poll = create(:poll, related: proposal,
+ starts_at: poll.ends_at,
+ ends_at: poll.ends_at + 8.days)
expect(poll).not_to be_valid
end
it "is not valid when overlaps with same interval" do
- _other_poll = create(:poll, related: proposal, starts_at: poll.starts_at,
- ends_at: poll.ends_at)
+ _other_poll = create(:poll, related: proposal,
+ starts_at: poll.starts_at,
+ ends_at: poll.ends_at)
expect(poll).not_to be_valid
end
it "is not valid when overlaps with interval contained" do
- _other_poll = create(:poll, related: proposal, starts_at: poll.starts_at + 1.day,
- ends_at: poll.ends_at - 1.day)
+ _other_poll = create(:poll, related: proposal,
+ starts_at: poll.starts_at + 1.day,
+ ends_at: poll.ends_at - 1.day)
expect(poll).not_to be_valid
end
it "is not valid when overlaps with interval containing" do
- _other_poll = create(:poll, related: proposal, starts_at: poll.starts_at - 8.days,
- ends_at: poll.ends_at + 8.days)
+ _other_poll = create(:poll, related: proposal,
+ starts_at: poll.starts_at - 8.days,
+ ends_at: poll.ends_at + 8.days)
expect(poll).not_to be_valid
end
end
diff --git a/spec/models/poll/stats_spec.rb b/spec/models/poll/stats_spec.rb
index 27b7571a0..4004608d0 100644
--- a/spec/models/poll/stats_spec.rb
+++ b/spec/models/poll/stats_spec.rb
@@ -19,7 +19,9 @@ describe Poll::Stats do
it "supports every channel" do
3.times { create(:poll_voter, :from_web, poll: poll) }
create(:poll_recount, :from_booth, poll: poll,
- total_amount: 8, white_amount: 4, null_amount: 1)
+ total_amount: 8,
+ white_amount: 4,
+ null_amount: 1)
expect(stats.total_participants_web).to eq(3)
expect(stats.total_participants_booth).to eq(13)
@@ -153,7 +155,9 @@ describe Poll::Stats do
it "is relative to the total amount of votes" do
3.times { create(:poll_voter, :from_web, poll: poll) }
create(:poll_recount, :from_booth, poll: poll,
- total_amount: 8, white_amount: 5, null_amount: 4)
+ total_amount: 8,
+ white_amount: 5,
+ null_amount: 4)
expect(stats.total_valid_percentage).to eq(50)
expect(stats.total_white_percentage).to eq(30)
diff --git a/spec/models/proposal_notification_spec.rb b/spec/models/proposal_notification_spec.rb
index 682ec9ed4..ae91fd3dd 100644
--- a/spec/models/proposal_notification_spec.rb
+++ b/spec/models/proposal_notification_spec.rb
@@ -153,8 +153,8 @@ describe ProposalNotification do
notification = create(:notification, notifiable: notifiable)
notifiable.proposal.update!(retired_at: Time.current,
- retired_explanation: "Unfeasible reason explanation",
- retired_reason: "unfeasible")
+ retired_explanation: "Unfeasible reason explanation",
+ retired_reason: "unfeasible")
expect(notification.check_availability(proposal)).to be(false)
end
end
diff --git a/spec/models/proposal_spec.rb b/spec/models/proposal_spec.rb
index 469e986b2..abb152549 100644
--- a/spec/models/proposal_spec.rb
+++ b/spec/models/proposal_spec.rb
@@ -427,23 +427,23 @@ describe Proposal do
it "expires cache when the author is hidden" do
expect { proposal.author.hide }
- .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
+ .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end
it "expires cache when the author is erased" do
expect { proposal.author.erase }
- .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
+ .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end
it "expires cache when its author changes" do
expect { proposal.author.update(username: "Eva") }
- .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
+ .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end
it "expires cache when the author's organization get verified" do
create(:organization, user: proposal.author)
expect { proposal.author.organization.verify }
- .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
+ .to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end
end
@@ -916,8 +916,8 @@ describe Proposal do
author = create(:user, :level_two)
voter_and_follower = create(:user, :level_two)
proposal = create(:proposal, author: author,
- voters: [author, voter_and_follower],
- followers: [author, voter_and_follower])
+ voters: [author, voter_and_follower],
+ followers: [author, voter_and_follower])
expect(proposal.users_to_notify).to eq([voter_and_follower])
end
diff --git a/spec/models/site_customization/image_spec.rb b/spec/models/site_customization/image_spec.rb
index 55534b535..89baf4dee 100644
--- a/spec/models/site_customization/image_spec.rb
+++ b/spec/models/site_customization/image_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
describe SiteCustomization::Image do
it "stores images with Active Storage" do
image = create(:site_customization_image, name: "map",
- image: fixture_file_upload("custom_map.jpg"))
+ image: fixture_file_upload("custom_map.jpg"))
expect(image.image).to be_attached
expect(image.image.filename).to eq "custom_map.jpg"
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 947df5e94..fc295d20f 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -491,16 +491,16 @@ describe User do
describe "#erase" do
it "erases user information and marks him as erased" do
user = create(:user,
- username: "manolo",
- email: "a@a.com",
- unconfirmed_email: "a@a.com",
- phone_number: "5678",
- confirmed_phone: "5678",
- unconfirmed_phone: "5678",
- encrypted_password: "foobar",
- confirmation_token: "token1",
- reset_password_token: "token2",
- email_verification_token: "token3")
+ username: "manolo",
+ email: "a@a.com",
+ unconfirmed_email: "a@a.com",
+ phone_number: "5678",
+ confirmed_phone: "5678",
+ unconfirmed_phone: "5678",
+ encrypted_password: "foobar",
+ confirmation_token: "token1",
+ reset_password_token: "token2",
+ email_verification_token: "token3")
user.erase("a test")
user.reload
diff --git a/spec/models/verification/management/document_spec.rb b/spec/models/verification/management/document_spec.rb
index f01a915d4..6dee5b10b 100644
--- a/spec/models/verification/management/document_spec.rb
+++ b/spec/models/verification/management/document_spec.rb
@@ -58,16 +58,16 @@ describe Verification::Management::Document do
describe "dates" do
it "is valid with a valid date of birth" do
verification_document = Verification::Management::Document.new("date_of_birth(3i)" => "1",
- "date_of_birth(2i)" => "1",
- "date_of_birth(1i)" => "1980")
+ "date_of_birth(2i)" => "1",
+ "date_of_birth(1i)" => "1980")
expect(verification_document.errors[:date_of_birth]).to be_empty
end
it "is not valid without a date of birth" do
verification_document = Verification::Management::Document.new("date_of_birth(3i)" => "",
- "date_of_birth(2i)" => "",
- "date_of_birth(1i)" => "")
+ "date_of_birth(2i)" => "",
+ "date_of_birth(1i)" => "")
expect(verification_document).not_to be_valid
expect(verification_document.errors[:date_of_birth]).to include("can't be blank")
end
diff --git a/spec/models/verification/residence_spec.rb b/spec/models/verification/residence_spec.rb
index e9733c7d7..8dc4b18e6 100644
--- a/spec/models/verification/residence_spec.rb
+++ b/spec/models/verification/residence_spec.rb
@@ -25,8 +25,8 @@ describe Verification::Residence do
it "validates user has allowed age" do
residence = Verification::Residence.new("date_of_birth(3i)" => "1",
- "date_of_birth(2i)" => "1",
- "date_of_birth(1i)" => 5.years.ago.year.to_s)
+ "date_of_birth(2i)" => "1",
+ "date_of_birth(1i)" => 5.years.ago.year.to_s)
expect(residence).not_to be_valid
expect(residence.errors[:date_of_birth]).to include("You don't have the required age to participate")
end
@@ -266,11 +266,11 @@ describe Verification::Residence do
expect(FailedCensusCall.count).to eq(1)
expect(FailedCensusCall.first).to have_attributes(
- user_id: residence.user.id,
+ user_id: residence.user.id,
document_number: "12345678Z",
- document_type: "1",
- date_of_birth: Date.new(1980, 12, 31),
- postal_code: "28001"
+ document_type: "1",
+ date_of_birth: Date.new(1980, 12, 31),
+ postal_code: "28001"
)
end
end
diff --git a/spec/shared/models/notifiable.rb b/spec/shared/models/notifiable.rb
index e41e7db80..a227fa6e4 100644
--- a/spec/shared/models/notifiable.rb
+++ b/spec/shared/models/notifiable.rb
@@ -73,7 +73,7 @@ shared_examples "notifiable" do
if notifiable.respond_to?(:retired_at)
notifiable.update!(retired_at: Time.current, retired_reason: "unfeasible",
- retired_explanation: "Unfeasibility explanation ...")
+ retired_explanation: "Unfeasibility explanation ...")
expect(notification.check_availability(notifiable)).to be(false)
end
end
diff --git a/spec/shared/system/admin_progressable.rb b/spec/shared/system/admin_progressable.rb
index bd7e9da98..9535e5611 100644
--- a/spec/shared/system/admin_progressable.rb
+++ b/spec/shared/system/admin_progressable.rb
@@ -10,9 +10,9 @@ shared_examples "admin_progressable" do |factory_name, path_name|
context "Index" do
scenario "Link to index path" do
- create(:progress_bar, :secondary, progressable: progressable,
- title: "Reading documents",
- percentage: 20)
+ create(:progress_bar, :secondary, progressable: progressable,
+ title: "Reading documents",
+ percentage: 20)
visit progressable_path
click_link "Manage progress bars"
diff --git a/spec/shared/system/remotely_translatable.rb b/spec/shared/system/remotely_translatable.rb
index 1204b8f64..87eb15533 100644
--- a/spec/shared/system/remotely_translatable.rb
+++ b/spec/shared/system/remotely_translatable.rb
@@ -10,8 +10,9 @@ shared_examples "remotely_translatable" do |factory_name, path_name, path_argume
before do
Setting["feature.remote_translations"] = true
available_locales_response = %w[de en es fr pt zh-Hans]
- expect(RemoteTranslations::Microsoft::AvailableLocales).to receive(:available_locales).at_most(4).times.
- and_return(available_locales_response)
+ expect(RemoteTranslations::Microsoft::AvailableLocales)
+ .to receive(:available_locales).at_most(4).times
+ .and_return(available_locales_response)
allow(Rails.application.secrets).to receive(:microsoft_api_key).and_return("123")
end
diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb
index 51da757f9..ea415fa61 100644
--- a/spec/support/common_actions.rb
+++ b/spec/support/common_actions.rb
@@ -35,8 +35,8 @@ module CommonActions
end
def validate_officer
- allow_any_instance_of(Officing::BaseController).
- to receive(:verify_officer_assignment).and_return(true)
+ allow_any_instance_of(Officing::BaseController)
+ .to receive(:verify_officer_assignment).and_return(true)
end
def fill_in_proposal
@@ -69,8 +69,8 @@ module CommonActions
def set_officing_booth(booth = nil)
booth = create(:poll_booth) if booth.blank?
- allow_any_instance_of(Officing::BaseController).
- to receive(:current_booth).and_return(booth)
+ allow_any_instance_of(Officing::BaseController)
+ .to receive(:current_booth).and_return(booth)
end
def click_sdg_goal(code)
diff --git a/spec/system/account_spec.rb b/spec/system/account_spec.rb
index 2d368a1d6..1e96fc6a8 100644
--- a/spec/system/account_spec.rb
+++ b/spec/system/account_spec.rb
@@ -61,9 +61,9 @@ describe "Account" do
click_button "Update"
- notice = "Your account has been updated successfully;"\
- " however, we need to verify your new email address."\
- " Please check your email and click on the link to"\
+ notice = "Your account has been updated successfully;" \
+ " however, we need to verify your new email address." \
+ " Please check your email and click on the link to" \
" complete the confirmation of your new email address."
expect(page).to have_content notice
diff --git a/spec/system/admin/activity_spec.rb b/spec/system/admin/activity_spec.rb
index ee6023993..af1e3ffdd 100644
--- a/spec/system/admin/activity_spec.rb
+++ b/spec/system/admin/activity_spec.rb
@@ -365,8 +365,8 @@ describe "Admin activity" do
scenario "Shows moderation activity on system emails" do
proposal = create(:proposal, title: "Proposal A")
proposal_notification = create(:proposal_notification, proposal: proposal,
- title: "Proposal A Title",
- body: "Proposal A Notification Body")
+ title: "Proposal A Title",
+ body: "Proposal A Notification Body")
proposal_notification.moderate_system_email(admin.user)
visit admin_activity_path
diff --git a/spec/system/admin/administrators_spec.rb b/spec/system/admin/administrators_spec.rb
index 10f355938..2c7ba525f 100644
--- a/spec/system/admin/administrators_spec.rb
+++ b/spec/system/admin/administrators_spec.rb
@@ -35,7 +35,7 @@ describe "Admin administrators" do
scenario "Delete Administrator" do
visit admin_administrators_path
- confirmation = "Are you sure? This action will delete "\
+ confirmation = "Are you sure? This action will delete " \
"\"#{user_administrator.name}\" and can't be undone."
within "#administrator_#{user_administrator.id}" do
diff --git a/spec/system/admin/banners_spec.rb b/spec/system/admin/banners_spec.rb
index e3baf6f86..16abaf32b 100644
--- a/spec/system/admin/banners_spec.rb
+++ b/spec/system/admin/banners_spec.rb
@@ -4,44 +4,44 @@ describe "Admin banners magement", :admin do
context "Index" do
before do
create(:banner, title: "Banner number one",
- description: "This is the text of banner number one and is not active yet",
- target_url: "http://www.url.com",
- post_started_at: (Date.current + 4.days),
- post_ended_at: (Date.current + 10.days),
- background_color: "#FF0000",
- font_color: "#FFFFFF")
+ description: "This is the text of banner number one and is not active yet",
+ target_url: "http://www.url.com",
+ post_started_at: (Date.current + 4.days),
+ post_ended_at: (Date.current + 10.days),
+ background_color: "#FF0000",
+ font_color: "#FFFFFF")
create(:banner, title: "Banner number two",
- description: "This is the text of banner number two and is not longer active",
- target_url: "http://www.url.com",
- post_started_at: (Date.current - 10.days),
- post_ended_at: (Date.current - 3.days),
- background_color: "#00FF00",
- font_color: "#FFFFFF")
+ description: "This is the text of banner number two and is not longer active",
+ target_url: "http://www.url.com",
+ post_started_at: (Date.current - 10.days),
+ post_ended_at: (Date.current - 3.days),
+ background_color: "#00FF00",
+ font_color: "#FFFFFF")
create(:banner, title: "Banner number three",
- description: "This is the text of banner number three",
- target_url: "http://www.url.com",
- post_started_at: (Date.current - 1.day),
- post_ended_at: (Date.current + 10.days),
- background_color: "#0000FF",
- font_color: "#FFFFFF")
+ description: "This is the text of banner number three",
+ target_url: "http://www.url.com",
+ post_started_at: (Date.current - 1.day),
+ post_ended_at: (Date.current + 10.days),
+ background_color: "#0000FF",
+ font_color: "#FFFFFF")
create(:banner, title: "Banner number four",
- description: "This is the text of banner number four",
- target_url: "http://www.url.com",
- post_started_at: (Date.current - 10.days),
- post_ended_at: (Date.current + 10.days),
- background_color: "#FFF000",
- font_color: "#FFFFFF")
+ description: "This is the text of banner number four",
+ target_url: "http://www.url.com",
+ post_started_at: (Date.current - 10.days),
+ post_ended_at: (Date.current + 10.days),
+ background_color: "#FFF000",
+ font_color: "#FFFFFF")
create(:banner, title: "Banner number five",
- description: "This is the text of banner number five",
- target_url: "http://www.url.com",
- post_started_at: (Date.current - 10.days),
- post_ended_at: (Date.current + 10.days),
- background_color: "#FFFF00",
- font_color: "#FFFFFF")
+ description: "This is the text of banner number five",
+ target_url: "http://www.url.com",
+ post_started_at: (Date.current - 10.days),
+ post_ended_at: (Date.current + 10.days),
+ background_color: "#FFFF00",
+ font_color: "#FFFFFF")
end
scenario "Index show active banners" do
@@ -124,9 +124,9 @@ describe "Admin banners magement", :admin do
scenario "Edit banner with live refresh" do
create(:banner, title: "Hello",
description: "Wrong text",
- target_url: "http://www.url.com",
+ target_url: "http://www.url.com",
post_started_at: (Date.current + 4.days),
- post_ended_at: (Date.current + 10.days),
+ post_ended_at: (Date.current + 10.days),
background_color: "#FF0000",
font_color: "#FFFFFF")
@@ -163,9 +163,9 @@ describe "Admin banners magement", :admin do
scenario "Delete a banner" do
create(:banner, title: "Ugly banner",
description: "Bad text",
- target_url: "http://www.url.com",
+ target_url: "http://www.url.com",
post_started_at: (Date.current + 4.days),
- post_ended_at: (Date.current + 10.days),
+ post_ended_at: (Date.current + 10.days),
background_color: "#FF0000",
font_color: "#FFFFFF")
diff --git a/spec/system/admin/budget_investments_spec.rb b/spec/system/admin/budget_investments_spec.rb
index affd87411..ac7408eee 100644
--- a/spec/system/admin/budget_investments_spec.rb
+++ b/spec/system/admin/budget_investments_spec.rb
@@ -67,8 +67,9 @@ describe "Admin budget investments", :admin do
admin = create(:administrator, user: create(:user, username: "Gema"))
budget_investment1 = create(:budget_investment, budget: budget, valuators: [valuator1])
- budget_investment2 = create(:budget_investment, budget: budget, valuators: [valuator1, valuator2],
- valuator_groups: [valuator_group])
+ budget_investment2 = create(:budget_investment, budget: budget,
+ valuators: [valuator1, valuator2],
+ valuator_groups: [valuator_group])
budget_investment3 = create(:budget_investment, budget: budget)
visit admin_budget_budget_investments_path(budget_id: budget.id)
@@ -147,8 +148,9 @@ describe "Admin budget investments", :admin do
administrator = create(:administrator, user: user)
administrator2 = create(:administrator, user: user2, description: "Alias")
budget.administrators = [administrator, administrator2]
- create(:budget_investment, title: "Realocate visitors", budget: budget,
- administrator: administrator)
+ create(:budget_investment, title: "Realocate visitors",
+ budget: budget,
+ administrator: administrator)
create(:budget_investment, title: "Destroy the city", budget: budget)
visit admin_budget_budget_investments_path(budget_id: budget.id)
@@ -299,16 +301,20 @@ describe "Admin budget investments", :admin do
end
scenario "Filtering by under valuation" do
- create(:budget_investment,
+ create(
+ :budget_investment,
:with_administrator,
:with_valuator,
:open,
title: "Investment without valuation",
- budget: budget)
- create(:budget_investment,
+ budget: budget
+ )
+ create(
+ :budget_investment,
:with_administrator,
title: "Investment with valuation",
- budget: budget)
+ budget: budget
+ )
visit admin_budget_budget_investments_path(budget_id: budget)
expect(page).to have_link("Investment without valuation")
@@ -400,8 +406,9 @@ describe "Admin budget investments", :admin do
scenario "Filtering by assignment status" do
create(:budget_investment, :with_administrator, title: "Assigned idea", budget: budget)
create(:budget_investment, :with_valuator, title: "Evaluating...", budget: budget)
- create(:budget_investment, title: "With group", budget: budget,
- valuator_groups: [create(:valuator_group)])
+ create(:budget_investment, title: "With group",
+ budget: budget,
+ valuator_groups: [create(:valuator_group)])
visit admin_budget_budget_investments_path(budget_id: budget.id, filter: "valuation_open")
@@ -410,14 +417,14 @@ describe "Admin budget investments", :admin do
expect(page).to have_content("With group")
visit admin_budget_budget_investments_path(budget_id: budget.id,
- advanced_filters: ["without_admin"])
+ advanced_filters: ["without_admin"])
expect(page).to have_content("Evaluating...")
expect(page).to have_content("With group")
expect(page).not_to have_content("Assigned idea")
visit admin_budget_budget_investments_path(budget_id: budget.id,
- advanced_filters: ["without_valuator"])
+ advanced_filters: ["without_valuator"])
expect(page).to have_content("Assigned idea")
expect(page).not_to have_content("Evaluating...")
@@ -438,7 +445,7 @@ describe "Admin budget investments", :admin do
expect(page).not_to have_content("Old idea")
visit admin_budget_budget_investments_path(budget_id: budget.id,
- advanced_filters: ["valuation_finished"])
+ advanced_filters: ["valuation_finished"])
expect(page).not_to have_content("Ongoing valuation")
expect(page).to have_content("Old idea")
@@ -528,7 +535,7 @@ describe "Admin budget investments", :admin do
click_button "Filter"
expect(page).not_to have_button "Calculate Winner Investments"
- expect(page).to have_content 'The budget has to stay on phase "Reviewing voting" '\
+ expect(page).to have_content 'The budget has to stay on phase "Reviewing voting" ' \
"in order to calculate winners projects"
visit admin_budget_path(budget)
@@ -613,8 +620,9 @@ describe "Admin budget investments", :admin do
administrator = create(:administrator, user: user)
budget.administrators = [administrator]
- educate_children = create(:budget_investment, budget: budget, title: "Educate the children",
- administrator: administrator)
+ educate_children = create(:budget_investment, budget: budget,
+ title: "Educate the children",
+ administrator: administrator)
create(:budget_investment, budget: budget, title: "More schools",
administrator: administrator)
create(:budget_investment, budget: budget, title: "More hospitals")
@@ -686,8 +694,9 @@ describe "Admin budget investments", :admin do
educate_children = create(:budget_investment, :feasible, :finished,
budget: budget, title: "Educate the children", administrator: administrator)
- create(:budget_investment, :feasible, :finished, budget: budget, title: "More schools",
- administrator: administrator)
+ create(:budget_investment, :feasible, :finished, budget: budget,
+ title: "More schools",
+ administrator: administrator)
create(:budget_investment, budget: budget, title: "More hospitals",
administrator: administrator)
create(:budget_investment, budget: budget, title: "More hostals")
@@ -923,13 +932,12 @@ describe "Admin budget investments", :admin do
user = create(:user, username: "Rachel", email: "rachel@valuators.org")
valuator = create(:valuator, user: user)
budget_investment = create(:budget_investment,
- :unfeasible,
- unfeasibility_explanation: "It is impossible",
- price: 1234,
- price_first_year: 1000,
- administrator: administrator,
- valuators: [valuator]
- )
+ :unfeasible,
+ unfeasibility_explanation: "It is impossible",
+ price: 1234,
+ price_first_year: 1000,
+ administrator: administrator,
+ valuators: [valuator])
visit admin_budget_budget_investments_path(budget_investment.budget)
@@ -955,12 +963,12 @@ describe "Admin budget investments", :admin do
scenario "Show image and documents on investment details" do
budget_investment = create(:budget_investment,
- :with_image,
- :unfeasible,
- unfeasibility_explanation: "It is impossible",
- price: 1234,
- price_first_year: 1000,
- administrator: administrator)
+ :with_image,
+ :unfeasible,
+ unfeasibility_explanation: "It is impossible",
+ price: 1234,
+ price_first_year: 1000,
+ administrator: administrator)
document = create(:document, documentable: budget_investment)
visit admin_budget_budget_investments_path(budget_investment.budget)
@@ -985,10 +993,10 @@ describe "Admin budget investments", :admin do
scenario "Does not show related content or hide links on preview" do
budget_investment = create(:budget_investment,
- :unfeasible,
- price: 1234,
- price_first_year: 1000,
- administrator: administrator)
+ :unfeasible,
+ price: 1234,
+ price_first_year: 1000,
+ administrator: administrator)
visit admin_budget_budget_investments_path(budget_investment.budget)
@@ -1001,8 +1009,8 @@ describe "Admin budget investments", :admin do
scenario "If budget is finished, investment cannot be edited or valuation comments created" do
finished_budget = create(:budget, :finished)
budget_investment = create(:budget_investment,
- budget: finished_budget,
- administrator: administrator)
+ budget: finished_budget,
+ administrator: administrator)
visit admin_budget_budget_investments_path(budget_investment.budget)
within_window(window_opened_by { click_link budget_investment.title }) do
@@ -1689,20 +1697,20 @@ describe "Admin budget investments", :admin do
first_budget_heading = create(:budget_heading, group: budget_group, name: "Budget Heading")
second_budget_heading = create(:budget_heading, group: budget_group, name: "Other Heading")
first_investment = create(:budget_investment, :feasible, :selected, title: "Le Investment",
- budget: budget, group: budget_group,
- heading: first_budget_heading,
- cached_votes_up: 88, price: 99,
- valuators: [],
- valuator_groups: [valuator_group],
- administrator: admin,
- visible_to_valuators: true)
+ budget: budget, group: budget_group,
+ heading: first_budget_heading,
+ cached_votes_up: 88, price: 99,
+ valuators: [],
+ valuator_groups: [valuator_group],
+ administrator: admin,
+ visible_to_valuators: true)
second_investment = create(:budget_investment, :unfeasible, title: "Alt Investment",
- budget: budget, group: budget_group,
- heading: second_budget_heading,
- cached_votes_up: 66, price: 88,
- valuators: [valuator],
- valuator_groups: [],
- visible_to_valuators: false)
+ budget: budget, group: budget_group,
+ heading: second_budget_heading,
+ cached_votes_up: 66, price: 88,
+ valuators: [valuator],
+ valuator_groups: [],
+ visible_to_valuators: false)
visit admin_budget_budget_investments_path(budget)
@@ -1712,12 +1720,12 @@ describe "Admin budget investments", :admin do
expect(header).to match(/^attachment/)
expect(header).to match(/filename="budget_investments.csv"/)
- csv_contents = "ID,Title,Supports,Administrator,Valuator,Valuation Group,Scope of operation,"\
- "Feasibility,Val. Fin.,Selected,Show to valuators,Author username\n"\
- "#{first_investment.id},Le Investment,88,Admin,-,Valuator Group,"\
- "Budget Heading,Feasible (€99),Yes,Yes,Yes,"\
- "#{first_investment.author.username}\n#{second_investment.id},"\
- "Alt Investment,66,No admin assigned,Valuator,-,Other Heading,"\
+ csv_contents = "ID,Title,Supports,Administrator,Valuator,Valuation Group,Scope of operation," \
+ "Feasibility,Val. Fin.,Selected,Show to valuators,Author username\n" \
+ "#{first_investment.id},Le Investment,88,Admin,-,Valuator Group," \
+ "Budget Heading,Feasible (€99),Yes,Yes,Yes," \
+ "#{first_investment.author.username}\n#{second_investment.id}," \
+ "Alt Investment,66,No admin assigned,Valuator,-,Other Heading," \
"Unfeasible,No,No,No,#{second_investment.author.username}\n"
expect(page.body).to eq(csv_contents)
@@ -1745,11 +1753,10 @@ describe "Admin budget investments", :admin do
context "Columns chooser" do
let!(:investment) do
create(:budget_investment,
- :winner,
- :visible_to_valuators,
- budget: budget,
- author: create(:user, username: "Jon Doe")
- )
+ :winner,
+ :visible_to_valuators,
+ budget: budget,
+ author: create(:user, username: "Jon Doe"))
end
let(:default_columns) do
%w[id title supports admin valuator geozone feasibility price
@@ -1790,8 +1797,8 @@ describe "Admin budget investments", :admin do
columns_cookie = cookies.find { |cookie| cookie[:name] == "investments-columns" }
cookie_value = columns_cookie[:value]
- expect(cookie_value).to eq("id,title,supports,admin,valuator,geozone," +
- "feasibility,price,valuation_finished,visible_to_valuators,selected,incompatible")
+ expect(cookie_value).to eq("id,title,supports,admin,valuator,geozone,feasibility,price," \
+ "valuation_finished,visible_to_valuators,selected,incompatible")
end
scenario "Use column selector to display visible columns" do
@@ -1840,8 +1847,8 @@ describe "Admin budget investments", :admin do
columns_cookie = cookies.find { |cookie| cookie[:name] == "investments-columns" }
cookie_value = columns_cookie[:value]
- expect(cookie_value).to eq("id,supports,admin,geozone," +
- "feasibility,valuation_finished,visible_to_valuators,selected,incompatible,author")
+ expect(cookie_value).to eq("id,supports,admin,geozone,feasibility,valuation_finished," \
+ "visible_to_valuators,selected,incompatible,author")
visit admin_budget_budget_investments_path(budget)
@@ -1849,8 +1856,8 @@ describe "Admin budget investments", :admin do
columns_cookie = cookies.find { |cookie| cookie[:name] == "investments-columns" }
cookie_value = columns_cookie[:value]
- expect(cookie_value).to eq("id,supports,admin,geozone,feasibility,valuation_finished," +
- "visible_to_valuators,selected,incompatible,author")
+ expect(cookie_value).to eq("id,supports,admin,geozone,feasibility,valuation_finished," \
+ "visible_to_valuators,selected,incompatible,author")
end
scenario "Select an investment when some columns are not displayed" do
diff --git a/spec/system/admin/budget_phases_spec.rb b/spec/system/admin/budget_phases_spec.rb
index 528285740..efc2638e1 100644
--- a/spec/system/admin/budget_phases_spec.rb
+++ b/spec/system/admin/budget_phases_spec.rb
@@ -7,8 +7,8 @@ describe "Admin budget phases" do
scenario "Update phase" do
visit edit_admin_budget_budget_phase_path(budget, budget.current_phase)
- expect(page).to have_content "These fields are used for information purposes only and do not trigger "\
- "an automatic update of the active phase. In order to update it, edit "\
+ expect(page).to have_content "These fields are used for information purposes only and do not trigger " \
+ "an automatic update of the active phase. In order to update it, edit " \
"the budget and select the active phase."
expect(page).to have_content "For information purposes only"
diff --git a/spec/system/admin/budgets_spec.rb b/spec/system/admin/budgets_spec.rb
index 68fde35ee..7d1fb85e7 100644
--- a/spec/system/admin/budgets_spec.rb
+++ b/spec/system/admin/budgets_spec.rb
@@ -235,8 +235,8 @@ describe "Admin budgets", :admin do
visit admin_budget_path(budget)
- expect(page).to have_content "The configuration of these phases is used for information purposes "\
- "only. Its function is to define the phases information displayed "\
+ expect(page).to have_content "The configuration of these phases is used for information purposes " \
+ "only. Its function is to define the phases information displayed " \
"on the public page of the participatory budget."
expect(page).to have_table "Phases", with_cols: [
[
@@ -357,7 +357,7 @@ describe "Admin budgets", :admin do
scenario "Change voting style uncheck hide money" do
budget_hide_money = create(:budget, :approval, :hide_money)
- hide_money_help_text = "If this option is checked, all fields showing the amount of money "\
+ hide_money_help_text = "If this option is checked, all fields showing the amount of money " \
"will be hidden throughout the process."
visit edit_admin_budget_path(budget_hide_money)
@@ -378,7 +378,7 @@ describe "Admin budgets", :admin do
scenario "Edit knapsack budget do not show hide money info" do
budget = create(:budget, :knapsack)
- hide_money_help_text = "If this option is checked, all fields showing the amount of money "\
+ hide_money_help_text = "If this option is checked, all fields showing the amount of money " \
"will be hidden throughout the process."
visit edit_admin_budget_path(budget)
@@ -394,7 +394,7 @@ describe "Admin budgets", :admin do
scenario "Edit approval budget show hide money info" do
budget = create(:budget, :approval)
- hide_money_help_text = "If this option is checked, all fields showing the amount of money "\
+ hide_money_help_text = "If this option is checked, all fields showing the amount of money " \
"will be hidden throughout the process."
visit edit_admin_budget_path(budget)
@@ -452,10 +452,11 @@ describe "Admin budgets", :admin do
scenario "For a Budget in reviewing balloting" do
budget = create(:budget, :reviewing_ballots)
heading = create(:budget_heading, budget: budget, price: 4)
- unselected = create(:budget_investment, :unselected, heading: heading, price: 1,
+ unselected = create(:budget_investment, :unselected, heading: heading,
+ price: 1,
ballot_lines_count: 3)
winner = create(:budget_investment, :selected, heading: heading, price: 3,
- ballot_lines_count: 2)
+ ballot_lines_count: 2)
selected = create(:budget_investment, :selected, heading: heading, price: 2, ballot_lines_count: 1)
visit admin_budget_path(budget)
diff --git a/spec/system/admin/local_census_records_spec.rb b/spec/system/admin/local_census_records_spec.rb
index cf30393b6..d88083705 100644
--- a/spec/system/admin/local_census_records_spec.rb
+++ b/spec/system/admin/local_census_records_spec.rb
@@ -139,7 +139,7 @@ describe "Admin local census records", :admin do
expect(page).to have_content deleted_document_number
- confirmation = "Are you sure? This action will delete "\
+ confirmation = "Are you sure? This action will delete " \
"\"#{local_census_record.title}\" and can't be undone."
accept_confirm(confirmation) { click_on "Delete" }
diff --git a/spec/system/admin/machine_learning_spec.rb b/spec/system/admin/machine_learning_spec.rb
index d058f8eb9..f7f4606e8 100644
--- a/spec/system/admin/machine_learning_spec.rb
+++ b/spec/system/admin/machine_learning_spec.rb
@@ -40,7 +40,7 @@ describe "Machine learning" do
visit admin_machine_learning_path
- expect(page).to have_content "This feature is disabled. To use Machine Learning you can enable it from "\
+ expect(page).to have_content "This feature is disabled. To use Machine Learning you can enable it from " \
"the settings page"
expect(page).to have_link "settings page", href: admin_settings_path(anchor: "tab-feature-flags")
end
@@ -56,7 +56,7 @@ describe "Machine learning" do
click_button "Execute script"
expect(page).to have_content "The last script has been executed successfully."
- expect(page).to have_content "You will receive an email in #{admin.email} when the script "\
+ expect(page).to have_content "You will receive an email in #{admin.email} when the script " \
"finishes running."
expect(page).to have_field "Select python script to execute"
@@ -71,11 +71,11 @@ describe "Machine learning" do
end
expect(page).to have_content "Related content"
- expect(page).to have_content "Adds automatically generated related content to proposals and "\
+ expect(page).to have_content "Adds automatically generated related content to proposals and " \
"participatory budget projects"
expect(page).to have_content "Comments summary"
- expect(page).to have_content "Displays an automatically generated comment summary on all items that "\
+ expect(page).to have_content "Displays an automatically generated comment summary on all items that " \
"can be commented on."
expect(page).to have_content "Tags"
@@ -94,7 +94,7 @@ describe "Machine learning" do
select "proposals_related_content_and_tags_nmf.py", from: "Select python script to execute"
click_button "Execute script"
- expect(page).to have_content "The script is running. The administrator who executed it will receive "\
+ expect(page).to have_content "The script is running. The administrator who executed it will receive " \
"an email when it is finished."
expect(page).to have_content "Executed by: #{admin.name}"
@@ -139,7 +139,7 @@ describe "Machine learning" do
expect(page).to have_content "Script name: proposals_related_content_and_tags_nmf.py"
expect(page).to have_content "Error: Error description"
- expect(page).to have_content "You will receive an email in #{admin.email} when the script "\
+ expect(page).to have_content "You will receive an email in #{admin.email} when the script " \
"finishes running."
expect(page).to have_field "Select python script to execute"
diff --git a/spec/system/admin/poll/booth_assigments_spec.rb b/spec/system/admin/poll/booth_assigments_spec.rb
index 6e9ebe695..3ca2df05d 100644
--- a/spec/system/admin/poll/booth_assigments_spec.rb
+++ b/spec/system/admin/poll/booth_assigments_spec.rb
@@ -240,34 +240,34 @@ describe "Admin booths assignments", :admin do
create(:poll_question_answer, title: "Tomorrow", question: question_2)
create(:poll_partial_result,
- booth_assignment: booth_assignment,
- question: question_1,
- answer: "Yes",
- amount: 11)
+ booth_assignment: booth_assignment,
+ question: question_1,
+ answer: "Yes",
+ amount: 11)
create(:poll_partial_result,
- booth_assignment: booth_assignment,
- question: question_1,
- answer: "No",
- amount: 4)
+ booth_assignment: booth_assignment,
+ question: question_1,
+ answer: "No",
+ amount: 4)
create(:poll_partial_result,
- booth_assignment: booth_assignment,
- question: question_2,
- answer: "Today",
- amount: 5)
+ booth_assignment: booth_assignment,
+ question: question_2,
+ answer: "Today",
+ amount: 5)
create(:poll_partial_result,
- booth_assignment: booth_assignment,
- question: question_2,
- answer: "Tomorrow",
- amount: 6)
+ booth_assignment: booth_assignment,
+ question: question_2,
+ answer: "Tomorrow",
+ amount: 6)
create(:poll_partial_result,
- booth_assignment: other_booth_assignment,
- question: question_1,
- answer: "Yes",
- amount: 9999)
+ booth_assignment: other_booth_assignment,
+ question: question_1,
+ answer: "Yes",
+ amount: 9999)
create(:poll_recount,
booth_assignment: booth_assignment,
diff --git a/spec/system/admin/poll/polls_spec.rb b/spec/system/admin/poll/polls_spec.rb
index 202c6b394..88aac7ae3 100644
--- a/spec/system/admin/poll/polls_spec.rb
+++ b/spec/system/admin/poll/polls_spec.rb
@@ -435,15 +435,15 @@ describe "Admin polls", :admin do
[booth_assignment_1, booth_assignment_2, booth_assignment_3].each do |ba|
create(:poll_partial_result,
- booth_assignment: ba,
- question: question_1,
- answer: "Yes",
- amount: 11)
+ booth_assignment: ba,
+ question: question_1,
+ answer: "Yes",
+ amount: 11)
create(:poll_partial_result,
- booth_assignment: ba,
- question: question_2,
- answer: "Tomorrow",
- amount: 5)
+ booth_assignment: ba,
+ question: question_2,
+ answer: "Tomorrow",
+ amount: 5)
end
create(:poll_recount,
booth_assignment: booth_assignment_1,
diff --git a/spec/system/admin/site_customization/content_blocks_spec.rb b/spec/system/admin/site_customization/content_blocks_spec.rb
index ef3e35d29..20e74b573 100644
--- a/spec/system/admin/site_customization/content_blocks_spec.rb
+++ b/spec/system/admin/site_customization/content_blocks_spec.rb
@@ -26,7 +26,7 @@ describe "Admin custom content blocks", :admin do
click_link "Create new content block"
select I18n.t("admin.site_customization.content_blocks.content_block.names.footer"),
- from: "site_customization_content_block_name"
+ from: "site_customization_content_block_name"
select "es", from: "site_customization_content_block_locale"
fill_in "site_customization_content_block_body", with: "Some custom content"
@@ -51,7 +51,7 @@ describe "Admin custom content blocks", :admin do
click_link "Create new content block"
select I18n.t("admin.site_customization.content_blocks.content_block.names.top_links"),
- from: "site_customization_content_block_name"
+ from: "site_customization_content_block_name"
select "en", from: "site_customization_content_block_locale"
fill_in "site_customization_content_block_body", with: "Some custom content"
diff --git a/spec/system/admin/site_customization/information_texts_spec.rb b/spec/system/admin/site_customization/information_texts_spec.rb
index 5b8ca7e20..1c085bc67 100644
--- a/spec/system/admin/site_customization/information_texts_spec.rb
+++ b/spec/system/admin/site_customization/information_texts_spec.rb
@@ -56,7 +56,7 @@ describe "Admin custom information texts", :admin do
within("#information-texts-tabs") { click_link "Proposals" }
expect(find("a[href=\"/admin/site_customization/information_texts?tab=proposals\"].is-active"))
- .to have_content "Proposals"
+ .to have_content "Proposals"
end
context "Globalization" do
@@ -104,8 +104,8 @@ describe "Admin custom information texts", :admin do
value_es: "Destacar personalizado")
page_title = create(:i18n_content, key: "debates.new.start_new",
- value_en: "Start a new debate",
- value_es: "Empezar un debate")
+ value_en: "Start a new debate",
+ value_es: "Empezar un debate")
visit admin_site_customization_information_texts_path(tab: "debates")
diff --git a/spec/system/admin/system_emails_spec.rb b/spec/system/admin/system_emails_spec.rb
index cce079532..a2786207b 100644
--- a/spec/system/admin/system_emails_spec.rb
+++ b/spec/system/admin/system_emails_spec.rb
@@ -254,23 +254,30 @@ describe "System Emails" do
describe "#evaluation_comment" do
scenario "render correctly evaluaton comment mailer with valuator as a sample user" do
admin = create(:administrator, user: create(:user, username: "Baby Doe"))
- investment = create(:budget_investment,
+ investment = create(
+ :budget_investment,
title: "Cleaner city",
heading: heading,
author: user,
- administrator: admin)
+ administrator: admin
+ )
comment = create(:comment, :valuation, commentable: investment)
visit admin_system_email_view_path("evaluation_comment")
expect(page).to have_content "New evaluation comment for Cleaner city"
expect(page).to have_content "Hi #{admin.name}"
- expect(page).to have_content "There is a new evaluation comment from #{comment.user.name} "\
+ expect(page).to have_content "There is a new evaluation comment from #{comment.user.name} " \
"to the budget investment Cleaner city"
expect(page).to have_content comment.body
expect(page).to have_link "Cleaner city",
- href: admin_budget_budget_investment_url(investment.budget, investment, anchor: "comments", host: app_host)
+ href: admin_budget_budget_investment_url(
+ investment.budget,
+ investment,
+ anchor: "comments",
+ host: app_host
+ )
end
scenario "uses a current_user as a sample user for sample regular comments" do
@@ -312,8 +319,8 @@ describe "System Emails" do
proposal1 = create(:proposal, title: "Proposal A")
proposal2 = create(:proposal, title: "Proposal B")
proposal_notification1 = create(:proposal_notification, proposal: proposal1,
- title: "Proposal A Title",
- body: "Proposal A Notification Body")
+ title: "Proposal A Title",
+ body: "Proposal A Notification Body")
proposal_notification2 = create(:proposal_notification, proposal: proposal2)
create(:notification, notifiable: proposal_notification1, emailed_at: nil)
create(:notification, notifiable: proposal_notification2, emailed_at: nil)
@@ -343,8 +350,8 @@ describe "System Emails" do
scenario "#send_pending" do
proposal = create(:proposal)
proposal_notification = create(:proposal_notification, proposal: proposal,
- title: "Proposal A Title",
- body: "Proposal A Notification Body")
+ title: "Proposal A Title",
+ body: "Proposal A Notification Body")
voter = create(:user, :level_two, followables: [proposal])
create(:notification, notifiable: proposal_notification, user: voter, emailed_at: nil)
diff --git a/spec/system/admin/verifications_spec.rb b/spec/system/admin/verifications_spec.rb
index 4700ad4c7..0d83c08f2 100644
--- a/spec/system/admin/verifications_spec.rb
+++ b/spec/system/admin/verifications_spec.rb
@@ -57,9 +57,9 @@ describe "Incomplete verifications", :admin do
scenario "SMS code not confirmed" do
incompletely_verified_user = create(:user, residence_verified_at: Time.current,
- unconfirmed_phone: "611111111",
+ unconfirmed_phone: "611111111",
sms_confirmation_code: "1234",
- confirmed_phone: nil)
+ confirmed_phone: nil)
visit admin_verifications_path
diff --git a/spec/system/admin/widgets/cards_spec.rb b/spec/system/admin/widgets/cards_spec.rb
index af4f215d2..d34549503 100644
--- a/spec/system/admin/widgets/cards_spec.rb
+++ b/spec/system/admin/widgets/cards_spec.rb
@@ -168,7 +168,7 @@ describe "Cards", :admin do
click_link "Create card"
expect(page).to have_link("Go back",
- href: admin_site_customization_page_widget_cards_path(custom_page))
+ href: admin_site_customization_page_widget_cards_path(custom_page))
fill_in "Title", with: "Card for a custom page"
fill_in "Link URL", with: "/any_path"
@@ -230,7 +230,7 @@ describe "Cards", :admin do
click_link "Edit"
expect(page).to have_link("Go back",
- href: admin_site_customization_page_widget_cards_path(custom_page))
+ href: admin_site_customization_page_widget_cards_path(custom_page))
within(".translatable-fields") do
fill_in "Title", with: "Updated title"
diff --git a/spec/system/banners_spec.rb b/spec/system/banners_spec.rb
index 93c557fb3..8ec32428f 100644
--- a/spec/system/banners_spec.rb
+++ b/spec/system/banners_spec.rb
@@ -6,7 +6,7 @@ describe "Banner" do
web_sections: [WebSection.find_by!(name: "homepage")],
description: "Banner description",
post_started_at: (Date.current - 4.days),
- post_ended_at: (Date.current + 10.days))
+ post_ended_at: (Date.current + 10.days))
visit root_path
diff --git a/spec/system/budgets/ballots_spec.rb b/spec/system/budgets/ballots_spec.rb
index 62653fdb0..ccd80d364 100644
--- a/spec/system/budgets/ballots_spec.rb
+++ b/spec/system/budgets/ballots_spec.rb
@@ -163,12 +163,14 @@ describe "Ballots" do
scenario "map and content block shoud be visible before and after" do
stub_const("#{Budgets::InvestmentsController}::PER_PAGE", 1)
- create(:budget_investment, :selected, :with_map_location,
+ create(
+ :budget_investment, :selected, :with_map_location,
heading: new_york,
price: 10000,
title: "More bridges",
)
- create(:budget_investment, :selected, :with_map_location,
+ create(
+ :budget_investment, :selected, :with_map_location,
heading: new_york,
price: 5000,
title: "Less bridges"
diff --git a/spec/system/budgets/budgets_spec.rb b/spec/system/budgets/budgets_spec.rb
index 155f86052..9a0589ecb 100644
--- a/spec/system/budgets/budgets_spec.rb
+++ b/spec/system/budgets/budgets_spec.rb
@@ -187,30 +187,30 @@ describe "Budgets" do
name: "Custom name for informing phase")
phases.accepting.update!(starts_at: "01-01-2018", ends_at: "10-01-2018", enabled: true,
- description: "Description of accepting phase",
- name: "Custom name for accepting phase")
+ description: "Description of accepting phase",
+ name: "Custom name for accepting phase")
phases.reviewing.update!(starts_at: "11-01-2018", ends_at: "20-01-2018", enabled: false,
- description: "Description of reviewing phase")
+ description: "Description of reviewing phase")
phases.selecting.update!(starts_at: "21-01-2018", ends_at: "01-02-2018", enabled: true,
- description: "Description of selecting phase",
- name: "Custom name for selecting phase")
+ description: "Description of selecting phase",
+ name: "Custom name for selecting phase")
phases.valuating.update!(starts_at: "10-02-2018", ends_at: "20-02-2018", enabled: false,
- description: "Description of valuating phase")
+ description: "Description of valuating phase")
phases.publishing_prices.update!(starts_at: "21-02-2018", ends_at: "01-03-2018", enabled: false,
- description: "Description of publishing prices phase")
+ description: "Description of publishing prices phase")
phases.balloting.update!(starts_at: "02-03-2018", ends_at: "10-03-2018", enabled: true,
- description: "Description of balloting phase")
+ description: "Description of balloting phase")
phases.reviewing_ballots.update!(starts_at: "11-03-2018", ends_at: "20-03-2018", enabled: false,
- description: "Description of reviewing ballots phase")
+ description: "Description of reviewing ballots phase")
phases.finished.update!(starts_at: "21-03-2018", ends_at: "30-03-2018", enabled: true,
- description: "Description of finished phase")
+ description: "Description of finished phase")
visit budgets_path
diff --git a/spec/system/budgets/investments_spec.rb b/spec/system/budgets/investments_spec.rb
index 0aa50b97a..c48f9425e 100644
--- a/spec/system/budgets/investments_spec.rb
+++ b/spec/system/budgets/investments_spec.rb
@@ -126,7 +126,7 @@ describe "Budget Investments" do
end
unlocated_heading = create(:budget_heading, name: "No Map", price: 500, group: group,
- longitude: nil, latitude: nil)
+ longitude: nil, latitude: nil)
create(:budget_investment, heading: unlocated_heading)
visit budget_investments_path(budget, heading_id: unlocated_heading.id)
within("#sidebar") do
@@ -603,7 +603,7 @@ describe "Budget Investments" do
fill_in_new_investment_title with: "Build a skyscraper"
fill_in_ckeditor "Description", with: "I want to live in a high tower over the clouds"
fill_in "Location additional info", with: "City center"
- fill_in "If you are proposing in the name of a collective/organization, "\
+ fill_in "If you are proposing in the name of a collective/organization, " \
"or on behalf of more people, write its name", with: "T.I.A."
fill_in "Tags", with: "Towers"
check "I agree to the Privacy Policy and the Terms and conditions of use"
@@ -645,7 +645,7 @@ describe "Budget Investments" do
visit new_budget_investment_path(budget)
expect(page).to have_select "Heading",
- options: ["", "More hospitals", "Medical supplies", "Even more hospitals"]
+ options: ["", "More hospitals", "Medical supplies", "Even more hospitals"]
expect(page).not_to have_content "Health"
end
@@ -661,14 +661,14 @@ describe "Budget Investments" do
expect(page).not_to have_content("#{heading.name} (#{budget.formatted_heading_price(heading)})")
expect(page).to have_select "Heading",
- options: ["", "Health: More hospitals", "Health: Medical supplies", "Education: Schools"]
+ options: ["", "Health: More hospitals", "Health: Medical supplies", "Education: Schools"]
select "Health: Medical supplies", from: "Heading"
fill_in_new_investment_title with: "Build a skyscraper"
fill_in_ckeditor "Description", with: "I want to live in a high tower over the clouds"
fill_in "Location additional info", with: "City center"
- fill_in "If you are proposing in the name of a collective/organization, "\
+ fill_in "If you are proposing in the name of a collective/organization, " \
"or on behalf of more people, write its name", with: "T.I.A."
fill_in "Tags", with: "Towers"
check "I agree to the Privacy Policy and the Terms and conditions of use"
@@ -987,11 +987,11 @@ describe "Budget Investments" do
unfeasibility_explanation: "Local government is not competent in this")
investment_2 = create(:budget_investment,
- :unfeasible,
- :finished,
- budget: budget,
- heading: heading,
- unfeasibility_explanation: "The unfeasible explanation")
+ :unfeasible,
+ :finished,
+ budget: budget,
+ heading: heading,
+ unfeasibility_explanation: "The unfeasible explanation")
user = create(:user)
login_as(user)
@@ -1000,14 +1000,14 @@ describe "Budget Investments" do
expect(page).not_to have_content("Unfeasibility explanation")
expect(page).not_to have_content("Local government is not competent in this")
- expect(page).not_to have_content("This investment project has been marked as not feasible "\
+ expect(page).not_to have_content("This investment project has been marked as not feasible " \
"and will not go to balloting phase")
visit budget_investment_path(budget, id: investment_2.id)
expect(page).to have_content("Unfeasibility explanation")
expect(page).to have_content("The unfeasible explanation")
- expect(page).to have_content("This investment project has been marked as not feasible "\
+ expect(page).to have_content("This investment project has been marked as not feasible " \
"and will not go to balloting phase")
end
@@ -1446,11 +1446,11 @@ describe "Budget Investments" do
global_group = create(:budget_group, budget: budget, name: "Global Group")
global_heading = create(:budget_heading, group: global_group, name: "Global Heading",
- latitude: -43.145412, longitude: 12.009423)
+ latitude: -43.145412, longitude: 12.009423)
carabanchel_heading = create(:budget_heading, group: group, name: "Carabanchel")
new_york_heading = create(:budget_heading, group: group, name: "New York",
- latitude: -43.223412, longitude: 12.009423)
+ latitude: -43.223412, longitude: 12.009423)
create(:budget_investment, :selected, price: 1, heading: global_heading, title: "World T-Shirt")
create(:budget_investment, :selected, price: 10, heading: global_heading, title: "Eco pens")
@@ -1472,7 +1472,7 @@ describe "Budget Investments" do
visit budget_ballot_path(budget)
- expect(page).to have_content "But you can change your vote at any time "\
+ expect(page).to have_content "But you can change your vote at any time " \
"until this phase is closed."
within("#budget_group_#{global_group.id}") do
diff --git a/spec/system/budgets/votes_spec.rb b/spec/system/budgets/votes_spec.rb
index 15c5d4caa..9d38b47b6 100644
--- a/spec/system/budgets/votes_spec.rb
+++ b/spec/system/budgets/votes_spec.rb
@@ -20,17 +20,17 @@ describe "Votes" do
within("#budget-investments") do
within("#budget_investment_#{investment1.id}_votes") do
- expect(page).to have_content "You have already supported this investment project. "\
+ expect(page).to have_content "You have already supported this investment project. " \
"Share it!"
end
within("#budget_investment_#{investment2.id}_votes") do
- expect(page).not_to have_content "You have already supported this investment project. "\
+ expect(page).not_to have_content "You have already supported this investment project. " \
"Share it!"
end
within("#budget_investment_#{investment3.id}_votes") do
- expect(page).not_to have_content "You have already supported this investment project. "\
+ expect(page).not_to have_content "You have already supported this investment project. " \
"Share it!"
end
end
@@ -45,7 +45,7 @@ describe "Votes" do
click_button "Support"
expect(page).to have_content "1 support"
- expect(page).to have_content "You have already supported this investment project. "\
+ expect(page).to have_content "You have already supported this investment project. " \
"Share it!"
end
end
@@ -77,7 +77,7 @@ describe "Votes" do
click_button "Support"
expect(page).to have_content "1 support"
- expect(page).to have_content "You have already supported this investment project. "\
+ expect(page).to have_content "You have already supported this investment project. " \
"Share it!"
end
end
@@ -123,7 +123,7 @@ describe "Votes" do
accept_confirm { click_button "Support" }
expect(page).to have_content "1 support"
- expect(page).to have_content "You have already supported this investment project. "\
+ expect(page).to have_content "You have already supported this investment project. " \
"Share it!"
end
@@ -135,7 +135,7 @@ describe "Votes" do
click_button "Support"
expect(page).to have_content "1 support"
- expect(page).to have_content "You have already supported this investment project. "\
+ expect(page).to have_content "You have already supported this investment project. " \
"Share it!"
end
@@ -144,17 +144,17 @@ describe "Votes" do
within("#budget_investment_#{third_heading_investment.id}") do
click_button "Support"
- expect(page).to have_content "You can only support investment projects in 2 districts. "\
+ expect(page).to have_content "You can only support investment projects in 2 districts. " \
"You have already supported investments in"
participation = find(".participation-not-allowed")
headings = participation.text
- .match(/You have already supported investments in (.+) and (.+)\./)&.captures
+ .match(/You have already supported investments in (.+) and (.+)\./)&.captures
expect(headings).to match_array [new_york.name, san_francisco.name]
expect(page).not_to have_content "1 support"
- expect(page).not_to have_content "You have already supported this investment project. "\
+ expect(page).not_to have_content "You have already supported this investment project. " \
"Share it!"
end
end
@@ -178,17 +178,17 @@ describe "Votes" do
click_button "Support"
- expect(page).to have_content "You can only support investment projects in 2 districts. "\
+ expect(page).to have_content "You can only support investment projects in 2 districts. " \
"You have already supported investments in"
participation = find(".participation-not-allowed")
headings = participation.text
- .match(/You have already supported investments in (.+) and (.+)\./)&.captures
+ .match(/You have already supported investments in (.+) and (.+)\./)&.captures
expect(headings).to match_array [new_york.name, san_francisco.name]
expect(page).not_to have_content "1 support"
- expect(page).not_to have_content "You have already supported this investment project. "\
+ expect(page).not_to have_content "You have already supported this investment project. " \
"Share it!"
end
diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb
index c8df55a93..6f7c6e55d 100644
--- a/spec/system/comments/budget_investments_spec.rb
+++ b/spec/system/comments/budget_investments_spec.rb
@@ -469,9 +469,9 @@ describe "Commenting Budget::Investments" do
manuela = create(:user, username: "Manuela")
admin = create(:administrator, user: manuela)
comment = create(:comment,
- commentable: investment,
- user: manuela,
- administrator_id: admin.id)
+ commentable: investment,
+ user: manuela,
+ administrator_id: admin.id)
visit budget_investment_path(investment.budget, investment)
diff --git a/spec/system/comments/budget_investments_valuation_spec.rb b/spec/system/comments/budget_investments_valuation_spec.rb
index 47d9823cc..1dc008483 100644
--- a/spec/system/comments/budget_investments_valuation_spec.rb
+++ b/spec/system/comments/budget_investments_valuation_spec.rb
@@ -130,7 +130,7 @@ describe "Internal valuation comments on Budget::Investments" do
end
scenario "Sanitizes comment body for security" do
- comment_with_js = " "\
+ comment_with_js = " " \
"click me http://www.url.com"
create(:comment, :valuation, author: admin_user, commentable: investment,
body: comment_with_js)
diff --git a/spec/system/dashboard/dashboard_spec.rb b/spec/system/dashboard/dashboard_spec.rb
index 97ee9d466..6eb79dbb2 100644
--- a/spec/system/dashboard/dashboard_spec.rb
+++ b/spec/system/dashboard/dashboard_spec.rb
@@ -25,9 +25,9 @@ describe "Proposal's dashboard" do
scenario "Dashboard progress shows current goal" do
goal = create(:dashboard_action, :resource, :active,
- required_supports: proposal.votes_for.size + 1_000)
+ required_supports: proposal.votes_for.size + 1_000)
future_goal = create(:dashboard_action, :resource, :active,
- required_supports: proposal.votes_for.size + 2_000)
+ required_supports: proposal.votes_for.size + 2_000)
visit progress_proposal_dashboard_path(proposal)
@@ -58,10 +58,10 @@ describe "Proposal's dashboard" do
scenario "Dashboard progress show proposed actions truncated description" do
action = create(:dashboard_action, :proposed_action, :active, description: "One short action")
action_long = create(:dashboard_action, :proposed_action, :active,
- description: "This is a really very long description for a proposed "\
- "action on progress dashboard section, so this description "\
- "should be appear truncated and shows the show description "\
- "link to show the complete description to the users.")
+ description: "This is a really very long description for a proposed " \
+ "action on progress dashboard section, so this description " \
+ "should be appear truncated and shows the show description " \
+ "link to show the complete description to the users.")
visit progress_proposal_dashboard_path(proposal)
@@ -154,16 +154,18 @@ describe "Proposal's dashboard" do
requested = create(:dashboard_action, :resource, :admin_request, :active)
executed_action = create(:dashboard_executed_action, action: requested,
- proposal: proposal, executed_at: Time.current)
+ proposal: proposal,
+ executed_at: Time.current)
_task = create(:dashboard_administrator_task, :pending, source: executed_action)
solved = create(:dashboard_action, :resource, :admin_request, :active)
executed_solved_action = create(:dashboard_executed_action, action: solved,
- proposal: proposal, executed_at: Time.current)
+ proposal: proposal,
+ executed_at: Time.current)
_solved_task = create(:dashboard_administrator_task, :done, source: executed_solved_action)
unavailable = create(:dashboard_action, :resource, :active,
- required_supports: proposal.votes_for.size + 1_000)
+ required_supports: proposal.votes_for.size + 1_000)
visit progress_proposal_dashboard_path(proposal)
within "div#available-resources-section" do
@@ -199,16 +201,18 @@ describe "Proposal's dashboard" do
requested = create(:dashboard_action, :resource, :admin_request, :active)
executed_action = create(:dashboard_executed_action, action: requested,
- proposal: proposal, executed_at: Time.current)
+ proposal: proposal,
+ executed_at: Time.current)
_task = create(:dashboard_administrator_task, :pending, source: executed_action)
solved = create(:dashboard_action, :resource, :admin_request, :active)
executed_solved_action = create(:dashboard_executed_action, action: solved,
- proposal: proposal, executed_at: Time.current)
+ proposal: proposal,
+ executed_at: Time.current)
_solved_task = create(:dashboard_administrator_task, :done, source: executed_solved_action)
unavailable = create(:dashboard_action, :resource, :active,
- required_supports: proposal.votes_for.size + 1_000)
+ required_supports: proposal.votes_for.size + 1_000)
visit progress_proposal_dashboard_path(proposal)
within "div#available-resources-section" do
@@ -241,8 +245,8 @@ describe "Proposal's dashboard" do
scenario "Dashboard progress dont show resources with published_proposal: true" do
available = create(:dashboard_action, :resource, :active, published_proposal: true)
unavailable = create(:dashboard_action, :resource, :active,
- required_supports: proposal.votes_for.size + 1_000,
- published_proposal: true)
+ required_supports: proposal.votes_for.size + 1_000,
+ published_proposal: true)
visit progress_proposal_dashboard_path(proposal)
@@ -269,7 +273,7 @@ describe "Proposal's dashboard" do
click_link(feature.title)
click_button "Request"
- expect(page).to have_content("The request has been successfully sent. We will contact you "\
+ expect(page).to have_content("The request has been successfully sent. We will contact you " \
"as soon as possible to inform you about it.")
end
@@ -294,7 +298,7 @@ describe "Proposal's dashboard" do
end
click_button "Request"
- expect(page).to have_content("The request has been successfully sent. We will contact you "\
+ expect(page).to have_content("The request has been successfully sent. We will contact you " \
"as soon as possible to inform you about it.")
end
@@ -377,7 +381,7 @@ describe "Proposal's dashboard" do
visit messages_proposal_dashboard_path(proposal)
expect(page).to have_link("See previous notifications", href: proposal_path(proposal,
- anchor: "tab-notifications"))
+ anchor: "tab-notifications"))
end
scenario "Dashboard has a related content section" do
@@ -511,7 +515,7 @@ describe "Proposal's dashboard" do
scenario "Display tag 'new' on proposed_action when it is new for author since last login" do
proposed_action = create(:dashboard_action, :proposed_action, :active, day_offset: 0,
- published_proposal: false)
+ published_proposal: false)
visit progress_proposal_dashboard_path(proposal)
@@ -522,7 +526,7 @@ describe "Proposal's dashboard" do
scenario "Not display tag 'new' on proposed_action when there is not new since last login" do
proposed_action = create(:dashboard_action, :proposed_action, :active, day_offset: 0,
- published_proposal: false)
+ published_proposal: false)
proposal.author.update!(current_sign_in_at: Date.current)
visit progress_proposal_dashboard_path(proposal)
diff --git a/spec/system/emails_spec.rb b/spec/system/emails_spec.rb
index a439921b7..38f1ea940 100644
--- a/spec/system/emails_spec.rb
+++ b/spec/system/emails_spec.rb
@@ -496,7 +496,8 @@ describe "Emails" do
expect(email.body.encoded).to include("This is a different body")
expect(email).to have_body_text("To unsubscribe from these emails, visit")
expect(email).to have_body_text(
- edit_subscriptions_path(token: user_with_newsletter_in_segment_2.subscriptions_token))
+ edit_subscriptions_path(token: user_with_newsletter_in_segment_2.subscriptions_token)
+ )
expect(email).to have_body_text('and uncheck "Receive relevant information by email"')
end
end
diff --git a/spec/system/home_spec.rb b/spec/system/home_spec.rb
index 6a2a36456..f74659a07 100644
--- a/spec/system/home_spec.rb
+++ b/spec/system/home_spec.rb
@@ -157,7 +157,8 @@ describe "Home" do
end
scenario "if there are cards, the 'featured' title will render" do
- create(:widget_card,
+ create(
+ :widget_card,
title: "Card text",
description: "Card description",
link_text: "Link text",
diff --git a/spec/system/legislation/draft_versions_spec.rb b/spec/system/legislation/draft_versions_spec.rb
index b3d69f30e..962adc087 100644
--- a/spec/system/legislation/draft_versions_spec.rb
+++ b/spec/system/legislation/draft_versions_spec.rb
@@ -348,9 +348,9 @@ describe "Legislation Draft Versions" do
before do
create(:legislation_annotation, draft_version: original, quote: "quote for version 1",
- ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }])
+ ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }])
create(:legislation_annotation, draft_version: current, quote: "quote for version 2",
- ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }])
+ ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }])
end
scenario "without js", :no_js do
@@ -386,7 +386,7 @@ describe "Legislation Draft Versions" do
scenario "See one annotation with replies for a draft version" do
annotation = create(:legislation_annotation, draft_version: draft_version, text: "my other annotation", quote: "audiam",
- ranges: [{ "start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }])
+ ranges: [{ "start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }])
visit legislation_process_draft_version_annotation_path(draft_version.process, draft_version, annotation)
diff --git a/spec/system/legislation/processes_spec.rb b/spec/system/legislation/processes_spec.rb
index 406cec2cf..6540ae3e5 100644
--- a/spec/system/legislation/processes_spec.rb
+++ b/spec/system/legislation/processes_spec.rb
@@ -399,10 +399,9 @@ describe "Legislation" do
scenario "With milestones" do
create(:milestone,
- milestoneable: process,
- description: "Something important happened",
- publication_date: Date.new(2018, 3, 22)
- )
+ milestoneable: process,
+ description: "Something important happened",
+ publication_date: Date.new(2018, 3, 22))
visit legislation_process_path(process)
diff --git a/spec/system/legislation/summary_spec.rb b/spec/system/legislation/summary_spec.rb
index 94f3d1ab6..37618b9e1 100644
--- a/spec/system/legislation/summary_spec.rb
+++ b/spec/system/legislation/summary_spec.rb
@@ -21,9 +21,8 @@ describe "Legislation" do
scenario "empty process" do
process = create(:legislation_process, :empty,
- result_publication_enabled: true,
- end_date: Date.current - 1.day
- )
+ result_publication_enabled: true,
+ end_date: Date.current - 1.day)
visit summary_legislation_process_path(process)
@@ -90,13 +89,13 @@ describe "Legislation" do
before do
create(:legislation_proposal, legislation_process_id: process.id,
- title: "Legislation proposal 1", selected: true)
+ title: "Legislation proposal 1", selected: true)
create(:legislation_proposal, legislation_process_id: process.id,
- title: "Legislation proposal 2", selected: false)
+ title: "Legislation proposal 2", selected: false)
create(:legislation_proposal, legislation_process_id: process.id,
- title: "Legislation proposal 3", selected: true)
+ title: "Legislation proposal 3", selected: true)
create(:legislation_proposal, legislation_process_id: process.id,
- title: "Legislation proposal 4", selected: false)
+ title: "Legislation proposal 4", selected: false)
end
scenario "shows proposals list" do
@@ -125,11 +124,11 @@ describe "Legislation" do
before do
user = create(:user, :level_two)
draft_version_1 = create(:legislation_draft_version, process: process,
- title: "Version 1", body: "Body of the first version",
- status: "published")
+ title: "Version 1", body: "Body of the first version",
+ status: "published")
draft_version_2 = create(:legislation_draft_version, process: process,
- title: "Version 2", body: "Body of the second version and that's it all of it",
- status: "published")
+ title: "Version 2", body: "Body of the second version and that's it all of it",
+ status: "published")
annotation0 = create(:legislation_annotation,
draft_version: draft_version_1, text: "my annotation123",
ranges: annotation_ranges(5, 10))
diff --git a/spec/system/machine_learning_spec.rb b/spec/system/machine_learning_spec.rb
index 0017b5a76..93bbd6115 100644
--- a/spec/system/machine_learning_spec.rb
+++ b/spec/system/machine_learning_spec.rb
@@ -24,8 +24,8 @@ describe "Machine learning" do
scenario "proposal view" do
create(:ml_summary_comment, commentable: proposal, body: "Life is wonderful")
create(:related_content, parent_relationable: proposal,
- child_relationable: related_proposal,
- machine_learning: true)
+ child_relationable: related_proposal,
+ machine_learning: true)
visit proposal_path(proposal)
@@ -50,8 +50,8 @@ describe "Machine learning" do
scenario "investment view" do
create(:ml_summary_comment, commentable: investment, body: "Build in the main square")
create(:related_content, parent_relationable: investment,
- child_relationable: related_investment,
- machine_learning: true)
+ child_relationable: related_investment,
+ machine_learning: true)
visit budget_investment_path(investment.budget, investment)
diff --git a/spec/system/management/document_verifications_spec.rb b/spec/system/management/document_verifications_spec.rb
index 30cb8de69..0549066cb 100644
--- a/spec/system/management/document_verifications_spec.rb
+++ b/spec/system/management/document_verifications_spec.rb
@@ -32,8 +32,9 @@ describe "DocumentVerifications" do
describe "Verifying througth Census" do
context "Census API" do
scenario "Verifying a user which does not exist and is not in the census shows an error" do
- expect_any_instance_of(Verification::Management::Document).to receive(:in_census?).
- and_return(false)
+ expect_any_instance_of(Verification::Management::Document)
+ .to receive(:in_census?)
+ .and_return(false)
login_as_manager
visit management_document_verifications_path
@@ -55,8 +56,9 @@ describe "DocumentVerifications" do
context "Remote Census API", :remote_census do
scenario "Verifying a user which does not exist and is not in the census shows an error" do
- expect_any_instance_of(Verification::Management::Document).to receive(:in_census?).
- and_return(false)
+ expect_any_instance_of(Verification::Management::Document)
+ .to receive(:in_census?)
+ .and_return(false)
login_as_manager
visit management_document_verifications_path
diff --git a/spec/system/moderation/budget_investments_spec.rb b/spec/system/moderation/budget_investments_spec.rb
index 0ec232715..bf8ec87d1 100644
--- a/spec/system/moderation/budget_investments_spec.rb
+++ b/spec/system/moderation/budget_investments_spec.rb
@@ -197,21 +197,24 @@ describe "Moderate budget investments" do
end
scenario "sorting investments" do
- flagged_investment = create(:budget_investment,
+ flagged_investment = create(
+ :budget_investment,
heading: heading,
title: "Flagged investment",
created_at: 1.day.ago,
flags_count: 5
)
- flagged_new_investment = create(:budget_investment,
+ flagged_new_investment = create(
+ :budget_investment,
heading: heading,
title: "Flagged new investment",
created_at: 12.hours.ago,
flags_count: 3
)
- latest_investment = create(:budget_investment,
+ latest_investment = create(
+ :budget_investment,
heading: heading,
title: "Latest investment",
created_at: Time.current
diff --git a/spec/system/officing/results_spec.rb b/spec/system/officing/results_spec.rb
index 4ffe58cc4..7fa0d8926 100644
--- a/spec/system/officing/results_spec.rb
+++ b/spec/system/officing/results_spec.rb
@@ -80,14 +80,16 @@ describe "Officing Results", :with_frozen_time do
end
scenario "Edit result" do
- partial_result = create(:poll_partial_result,
- officer_assignment: poll_officer.officer_assignments.first,
- booth_assignment: poll_officer.officer_assignments.first.booth_assignment,
- date: Date.current,
- question: question_1,
- answer: question_1.question_answers.first.title,
- author: poll_officer.user,
- amount: 7777)
+ partial_result = create(
+ :poll_partial_result,
+ officer_assignment: poll_officer.officer_assignments.first,
+ booth_assignment: poll_officer.officer_assignments.first.booth_assignment,
+ date: Date.current,
+ question: question_1,
+ answer: question_1.question_answers.first.title,
+ author: poll_officer.user,
+ amount: 7777
+ )
visit officing_poll_results_path(poll, date: I18n.l(partial_result.date), booth_assignment_id: partial_result.booth_assignment_id)
@@ -129,20 +131,24 @@ describe "Officing Results", :with_frozen_time do
booth_assignment = officer_assignment.booth_assignment
booth = booth_assignment.booth
- create(:poll_partial_result,
+ create(
+ :poll_partial_result,
officer_assignment: officer_assignment,
booth_assignment: booth_assignment,
date: poll.ends_at,
question: question_1,
- amount: 33)
+ amount: 33
+ )
- create(:poll_recount,
+ create(
+ :poll_recount,
officer_assignment: officer_assignment,
booth_assignment: booth_assignment,
date: poll.ends_at,
white_amount: 21,
null_amount: 44,
- total_amount: 66)
+ total_amount: 66
+ )
visit officing_poll_results_path(poll,
date: I18n.l(poll.ends_at.to_date),
diff --git a/spec/system/proposal_notifications_spec.rb b/spec/system/proposal_notifications_spec.rb
index d15889dcc..53f763de7 100644
--- a/spec/system/proposal_notifications_spec.rb
+++ b/spec/system/proposal_notifications_spec.rb
@@ -17,7 +17,7 @@ describe "Proposal Notifications" do
click_link "Send notification to proposal followers"
fill_in "proposal_notification_title", with: "Thank you for supporting my proposal"
- fill_in "proposal_notification_body", with: "Please share it with "\
+ fill_in "proposal_notification_body", with: "Please share it with " \
"others so we can make it happen!"
click_button "Send notification"
@@ -79,11 +79,11 @@ describe "Proposal Notifications" do
proposal = create(:proposal)
create(:proposal_notification,
- proposal: proposal, title: "Hey guys",
- body: "Just wanted to let you know that...")
+ proposal: proposal, title: "Hey guys",
+ body: "Just wanted to let you know that...")
create(:proposal_notification,
- proposal: proposal, title: "Another update",
- body: "We are almost there please share with your peoples!")
+ proposal: proposal, title: "Another update",
+ body: "We are almost there please share with your peoples!")
visit proposal_path(proposal)
click_link "Notifications (2)"
@@ -104,10 +104,10 @@ describe "Proposal Notifications" do
login_as(author)
visit new_proposal_notification_path(proposal_id: proposal.id)
- expect(page).to have_content "This notification will be sent to 7 people and it will "\
+ expect(page).to have_content "This notification will be sent to 7 people and it will " \
"be visible in the proposal's page"
expect(page).to have_link("the proposal's page", href: proposal_path(proposal,
- anchor: "comments"))
+ anchor: "comments"))
end
scenario "Message about receivers (Disctinct Followers and Voters)" do
@@ -120,10 +120,10 @@ describe "Proposal Notifications" do
login_as(author)
visit new_proposal_notification_path(proposal_id: proposal.id)
- expect(page).to have_content "This notification will be sent to 7 people and it will "\
+ expect(page).to have_content "This notification will be sent to 7 people and it will " \
"be visible in the proposal's page"
expect(page).to have_link("the proposal's page", href: proposal_path(proposal,
- anchor: "comments"))
+ anchor: "comments"))
end
scenario "Message about receivers (Same Followers and Voters)" do
@@ -135,10 +135,10 @@ describe "Proposal Notifications" do
login_as(author)
visit new_proposal_notification_path(proposal_id: proposal.id)
- expect(page).to have_content "This notification will be sent to 1 people and it will "\
+ expect(page).to have_content "This notification will be sent to 1 people and it will " \
"be visible in the proposal's page"
expect(page).to have_link("the proposal's page", href: proposal_path(proposal,
- anchor: "comments"))
+ anchor: "comments"))
end
context "Permissions" do
@@ -190,7 +190,7 @@ describe "Proposal Notifications" do
visit new_proposal_notification_path(proposal_id: proposal.id)
fill_in "proposal_notification_title", with: "Thank you for supporting my proposal"
- fill_in "proposal_notification_body", with: "Please share it with "\
+ fill_in "proposal_notification_body", with: "Please share it with " \
"others so we can make it happen!"
click_button "Send notification"
@@ -242,7 +242,7 @@ describe "Proposal Notifications" do
visit new_proposal_notification_path(proposal_id: proposal.id)
fill_in "proposal_notification_title", with: "Thank you for supporting my proposal"
- fill_in "proposal_notification_body", with: "Please share it with "\
+ fill_in "proposal_notification_body", with: "Please share it with " \
"others so we can make it happen!"
click_button "Send notification"
@@ -292,7 +292,7 @@ describe "Proposal Notifications" do
visit new_proposal_notification_path(proposal_id: proposal.id)
fill_in "proposal_notification_title", with: "Thank you for supporting my proposal"
- fill_in "proposal_notification_body", with: "Please share it with "\
+ fill_in "proposal_notification_body", with: "Please share it with " \
"others so we can make it happen!"
click_button "Send notification"
diff --git a/spec/system/proposals_spec.rb b/spec/system/proposals_spec.rb
index bf0dcb2a9..5969d856a 100644
--- a/spec/system/proposals_spec.rb
+++ b/spec/system/proposals_spec.rb
@@ -1000,7 +1000,7 @@ describe "Proposals" do
Setting["feature.featured_proposals"] = true
featured_proposal = create(:proposal, :with_confidence_score, cached_votes_up: 100)
archived_proposal = create(:proposal, :archived, :with_confidence_score,
- cached_votes_up: 10000)
+ cached_votes_up: 10000)
visit proposals_path
diff --git a/spec/system/sdg_management/local_targets_spec.rb b/spec/system/sdg_management/local_targets_spec.rb
index 77d5e6065..ea1da65fc 100644
--- a/spec/system/sdg_management/local_targets_spec.rb
+++ b/spec/system/sdg_management/local_targets_spec.rb
@@ -89,7 +89,7 @@ describe "Local Targets" do
sdg_local_target = create(:sdg_local_target, code: "1.1.1")
visit sdg_management_local_targets_path
- confirmation = "Are you sure? This action will delete "\
+ confirmation = "Are you sure? This action will delete " \
"\"#{sdg_local_target.title}\" and can't be undone."
accept_confirm(confirmation) { click_button "Delete" }
diff --git a/spec/system/site_customization/custom_pages_spec.rb b/spec/system/site_customization/custom_pages_spec.rb
index 138b4b0d5..e7586d939 100644
--- a/spec/system/site_customization/custom_pages_spec.rb
+++ b/spec/system/site_customization/custom_pages_spec.rb
@@ -4,7 +4,8 @@ describe "Custom Pages" do
context "New custom page" do
context "Published" do
scenario "See page" do
- custom_page = create(:site_customization_page, :published,
+ custom_page = create(
+ :site_customization_page, :published,
slug: "other-slug",
title_en: "Custom page",
content_en: "Text for new custom page",
@@ -20,7 +21,8 @@ describe "Custom Pages" do
end
scenario "Show all fields and text with links" do
- custom_page = create(:site_customization_page, :published,
+ custom_page = create(
+ :site_customization_page, :published,
slug: "slug-with-all-fields-filled",
title_en: "Custom page",
subtitle_en: "This is my new custom page",
@@ -39,7 +41,8 @@ describe "Custom Pages" do
end
scenario "Don't show subtitle if its blank" do
- custom_page = create(:site_customization_page, :published,
+ custom_page = create(
+ :site_customization_page, :published,
slug: "slug-without-subtitle",
title_en: "Custom page",
subtitle_en: "",
@@ -57,7 +60,8 @@ describe "Custom Pages" do
end
scenario "Listed in more information page" do
- create(:site_customization_page, :published,
+ create(
+ :site_customization_page, :published,
slug: "another-slug",
title_en: "Another custom page",
subtitle_en: "Subtitle for custom page",
@@ -70,7 +74,8 @@ describe "Custom Pages" do
end
scenario "Not listed in more information page" do
- custom_page = create(:site_customization_page, :published,
+ custom_page = create(
+ :site_customization_page, :published,
slug: "another-slug", title_en: "Another custom page",
subtitle_en: "Subtitle for custom page",
more_info_flag: false
diff --git a/spec/system/tags/budget_investments_spec.rb b/spec/system/tags/budget_investments_spec.rb
index 5ba391688..b970f59e1 100644
--- a/spec/system/tags/budget_investments_spec.rb
+++ b/spec/system/tags/budget_investments_spec.rb
@@ -6,7 +6,7 @@ describe "Tags" do
let(:group) { create(:budget_group, name: "Health", budget: budget) }
let!(:heading) do
create(:budget_heading, name: "More hospitals",
- group: group, latitude: "40.416775", longitude: "-3.703790")
+ group: group, latitude: "40.416775", longitude: "-3.703790")
end
let!(:tag_medio_ambiente) { create(:tag, :category, name: "Medio Ambiente") }
let!(:tag_economia) { create(:tag, :category, name: "EconomÃa") }
diff --git a/spec/system/users_auth_spec.rb b/spec/system/users_auth_spec.rb
index 646cd3716..9257a70e2 100644
--- a/spec/system/users_auth_spec.rb
+++ b/spec/system/users_auth_spec.rb
@@ -611,7 +611,7 @@ describe "Users" do
fill_in "Email", with: "manuela@consul.dev"
click_button "Send instructions"
- expect(page).to have_content "If your email address is in our database, in a few minutes "\
+ expect(page).to have_content "If your email address is in our database, in a few minutes " \
"you will receive a link to use to reset your password."
action_mailer = ActionMailer::Base.deliveries.last.body.to_s
@@ -633,7 +633,7 @@ describe "Users" do
fill_in "Email", with: "fake@mail.dev"
click_button "Send instructions"
- expect(page).to have_content "If your email address is in our database, in a few minutes "\
+ expect(page).to have_content "If your email address is in our database, in a few minutes " \
"you will receive a link to use to reset your password."
end
@@ -648,7 +648,7 @@ describe "Users" do
fill_in "Email", with: "manuela@consul.dev"
click_button "Re-send instructions"
- expect(page).to have_content "If your email address exists in our database, in a few minutes you will "\
+ expect(page).to have_content "If your email address exists in our database, in a few minutes you will " \
"receive an email with instructions on how to confirm your email address."
expect(ActionMailer::Base.deliveries.count).to eq(1)
expect(ActionMailer::Base.deliveries.first.to).to eq(["manuela@consul.dev"])
@@ -664,7 +664,7 @@ describe "Users" do
fill_in "Email", with: "fake@mail.dev"
click_button "Re-send instructions"
- expect(page).to have_content "If your email address exists in our database, in a few minutes you will "\
+ expect(page).to have_content "If your email address exists in our database, in a few minutes you will " \
"receive an email with instructions on how to confirm your email address."
expect(ActionMailer::Base.deliveries.count).to eq(0)
end
@@ -680,7 +680,7 @@ describe "Users" do
fill_in "user_email", with: "manuela@consul.dev"
click_button "Re-send instructions"
- expect(page).to have_content "If your email address exists in our database, in a few minutes you will "\
+ expect(page).to have_content "If your email address exists in our database, in a few minutes you will " \
"receive an email with instructions on how to confirm your email address."
expect(ActionMailer::Base.deliveries.count).to eq(1)
expect(ActionMailer::Base.deliveries.first.to).to eq(["manuela@consul.dev"])
diff --git a/spec/system/valuation/budget_investments_spec.rb b/spec/system/valuation/budget_investments_spec.rb
index 38fe053aa..2fda09f67 100644
--- a/spec/system/valuation/budget_investments_spec.rb
+++ b/spec/system/valuation/budget_investments_spec.rb
@@ -202,10 +202,11 @@ describe "Valuation budget investments" do
create(:valuator, user: create(:user, username: "Rick", email: "rick@valuators.org"))
end
let(:investment) do
- create(:budget_investment, :unfeasible, budget: budget, price: 1234,
- unfeasibility_explanation: "It is impossible",
- administrator: administrator,
- valuators: [valuator, second_valuator])
+ create(:budget_investment, :unfeasible, budget: budget,
+ price: 1234,
+ unfeasibility_explanation: "It is impossible",
+ administrator: administrator,
+ valuators: [valuator, second_valuator])
end
scenario "visible for assigned valuators" do
diff --git a/spec/system/verification/email_spec.rb b/spec/system/verification/email_spec.rb
index 3c3a4381f..3bd429772 100644
--- a/spec/system/verification/email_spec.rb
+++ b/spec/system/verification/email_spec.rb
@@ -4,13 +4,13 @@ describe "Verify email" do
scenario "Verify" do
user = create(:user,
residence_verified_at: Time.current,
- document_number: "12345678Z",
- document_type: "dni")
+ document_number: "12345678Z",
+ document_type: "dni")
verified_user = create(:verified_user,
document_number: "12345678Z",
- document_type: "dni",
- email: "rock@example.com")
+ document_type: "dni",
+ email: "rock@example.com")
login_as(user)
@@ -44,13 +44,13 @@ describe "Verify email" do
scenario "Errors on sending confirmation email" do
user = create(:user,
residence_verified_at: Time.current,
- document_number: "12345678Z",
- document_type: "dni")
+ document_number: "12345678Z",
+ document_type: "dni")
verified_user = create(:verified_user,
document_number: "12345678Z",
- document_type: "dni",
- email: "rock@example.com")
+ document_type: "dni",
+ email: "rock@example.com")
login_as(user)
diff --git a/spec/system/verification/letter_spec.rb b/spec/system/verification/letter_spec.rb
index 5ff61fde5..f75a64669 100644
--- a/spec/system/verification/letter_spec.rb
+++ b/spec/system/verification/letter_spec.rb
@@ -3,14 +3,14 @@ require "rails_helper"
describe "Verify Letter" do
scenario "Request a letter" do
user = create(:user, residence_verified_at: Time.current,
- confirmed_phone: "611111111")
+ confirmed_phone: "611111111")
login_as(user)
visit new_letter_path
click_link "Send me a letter with the code"
- expect(page).to have_content "Thank you for requesting your maximum security code (only required for the final votes). In a few days"\
+ expect(page).to have_content "Thank you for requesting your maximum security code (only required for the final votes). In a few days" \
" we will send it to the address featuring in the data we have on file."
user.reload
@@ -42,7 +42,7 @@ describe "Verify Letter" do
context "Code verification" do
scenario "Valid verification user logged in" do
user = create(:user, residence_verified_at: Time.current,
- confirmed_phone: "611111111",
+ confirmed_phone: "611111111",
letter_verification_code: "123456")
login_as(user)
@@ -59,7 +59,7 @@ describe "Verify Letter" do
scenario "Valid verification of user failing to add trailing zeros" do
user = create(:user, residence_verified_at: Time.current,
- confirmed_phone: "611111111",
+ confirmed_phone: "611111111",
letter_verification_code: "012345")
login_as(user)
@@ -76,7 +76,7 @@ describe "Verify Letter" do
scenario "Valid verification user not logged in" do
user = create(:user, residence_verified_at: Time.current,
- confirmed_phone: "611111111",
+ confirmed_phone: "611111111",
letter_verification_code: "123456")
visit edit_letter_path
@@ -100,7 +100,7 @@ describe "Verify Letter" do
scenario "Error messages on verification" do
user = create(:user, residence_verified_at: Time.current,
- confirmed_phone: "611111111")
+ confirmed_phone: "611111111")
visit edit_letter_path
fill_in "verification_letter_email", with: user.email
@@ -111,8 +111,8 @@ describe "Verify Letter" do
end
scenario "6 tries allowed" do
- user = create(:user, residence_verified_at: Time.current,
- confirmed_phone: "611111111",
+ user = create(:user, residence_verified_at: Time.current,
+ confirmed_phone: "611111111",
letter_verification_code: "123456")
visit edit_letter_path
diff --git a/spec/system/verification/level_three_verification_spec.rb b/spec/system/verification/level_three_verification_spec.rb
index ad55f30fd..0d2a30749 100644
--- a/spec/system/verification/level_three_verification_spec.rb
+++ b/spec/system/verification/level_three_verification_spec.rb
@@ -7,8 +7,8 @@ describe "Level three verification" do
verified_user = create(:verified_user,
document_number: "12345678Z",
- document_type: "1",
- phone: "611111111")
+ document_type: "1",
+ phone: "611111111")
login_as(user)
@@ -39,8 +39,8 @@ describe "Level three verification" do
verified_user = create(:verified_user,
document_number: "12345678Z",
- document_type: "1",
- email: "rock@example.com")
+ document_type: "1",
+ email: "rock@example.com")
login_as(user)
@@ -87,7 +87,7 @@ describe "Level three verification" do
click_link "Send me a letter with the code"
- expect(page).to have_content "Thank you for requesting your maximum security code (only required for the final votes)."\
+ expect(page).to have_content "Thank you for requesting your maximum security code (only required for the final votes)." \
" In a few days we will send it to the address featuring in the data we have on file."
end
end
diff --git a/spec/system/verification/residence_spec.rb b/spec/system/verification/residence_spec.rb
index 22ad66d11..c54e44fee 100644
--- a/spec/system/verification/residence_spec.rb
+++ b/spec/system/verification/residence_spec.rb
@@ -48,9 +48,9 @@ describe "Residence" do
click_link "Verify my account"
expect(page).to have_select("residence_date_of_birth_1i",
- with_options: [min_age.years.ago.year])
+ with_options: [min_age.years.ago.year])
expect(page).not_to have_select("residence_date_of_birth_1i",
- with_options: [underage.years.ago.year])
+ with_options: [underage.years.ago.year])
end
scenario "When trying to verify a deregistered account old votes are reassigned" do
<%= truncate comment.body, length: 250 %>
diff --git a/app/views/legislation/annotations/_comments_box.html.erb b/app/views/legislation/annotations/_comments_box.html.erb index c33429e07..8b06813d9 100644 --- a/app/views/legislation/annotations/_comments_box.html.erb +++ b/app/views/legislation/annotations/_comments_box.html.erb @@ -23,10 +23,10 @@ diff --git a/app/views/legislation/draft_versions/show.html.erb b/app/views/legislation/draft_versions/show.html.erb index f4f1ad0ed..e42bb0920 100644 --- a/app/views/legislation/draft_versions/show.html.erb +++ b/app/views/legislation/draft_versions/show.html.erb @@ -25,7 +25,7 @@ <% end %>