From 7b7da1adb7c1c589552265c3cf7cf2c5fc0bed35 Mon Sep 17 00:00:00 2001 From: Shujat Khalid Date: Fri, 22 Sep 2023 08:40:56 +0100 Subject: [PATCH] linting fix --- ...ubject_limited_to_not_null_in_countries.rb | 6 ++++- spec/models/eligibility_check_spec.rb | 6 +---- .../support_interface/countries_spec.rb | 24 ++++--------------- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/db/migrate/20230921082209_change_subject_limited_to_not_null_in_countries.rb b/db/migrate/20230921082209_change_subject_limited_to_not_null_in_countries.rb index ef5c22d274..ae5b018b39 100644 --- a/db/migrate/20230921082209_change_subject_limited_to_not_null_in_countries.rb +++ b/db/migrate/20230921082209_change_subject_limited_to_not_null_in_countries.rb @@ -1,5 +1,9 @@ class ChangeSubjectLimitedToNotNullInCountries < ActiveRecord::Migration[7.0] def change - change_column :countries, :subject_limited, :boolean, default: false, null: false + change_column :countries, + :subject_limited, + :boolean, + default: false, + null: false end end diff --git a/spec/models/eligibility_check_spec.rb b/spec/models/eligibility_check_spec.rb index 7732aae042..39578637cd 100644 --- a/spec/models/eligibility_check_spec.rb +++ b/spec/models/eligibility_check_spec.rb @@ -291,11 +291,7 @@ subject { eligibility_check.status } let(:eligibility_check) { described_class.new(attributes) } - let(:country) do - create( - :country, - ) - end + let(:country) { create(:country) } context "when no attributes are present" do let(:attributes) { nil } diff --git a/spec/system/support_interface/countries_spec.rb b/spec/system/support_interface/countries_spec.rb index d221c83c54..e447adf042 100644 --- a/spec/system/support_interface/countries_spec.rb +++ b/spec/system/support_interface/countries_spec.rb @@ -59,34 +59,18 @@ private def given_countries_exist - create( - :region, - :national, - country: create(:country, code: "IE"), - ) - create( - :region, - :national, - country: create(:country, code: "PL"), - ) + create(:region, :national, country: create(:country, code: "IE")) + create(:region, :national, country: create(:country, code: "PL")) united_states = create(:country, code: "US") create(:region, name: "Hawaii", country: united_states) create(:region, name: "New York", country: united_states) - create( - :region, - :national, - country: create(:country, code: "ES"), - ) + create(:region, :national, country: create(:country, code: "ES")) create( :region, name: "British Columbia", country: create(:country, code: "CA"), ) - create( - :region, - :national, - country: create(:country, code: "CY"), - ) + create(:region, :national, country: create(:country, code: "CY")) end def when_i_visit_the_countries_page