diff --git a/Gemfile.lock b/Gemfile.lock index a97bc3dc4..922c70800 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -275,6 +275,7 @@ GEM rest-client (~> 2.0) language_server-protocol (3.17.0.4) link_header (0.0.8) + lint_roller (1.1.0) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -702,36 +703,40 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.2) - rubocop (1.70.0) + rubocop (1.73.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) + rubocop-ast (1.38.1) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-govuk (5.0.8) - rubocop (= 1.70.0) - rubocop-ast (= 1.37.0) + rubocop-govuk (5.0.9) + rubocop (= 1.73.2) + rubocop-ast (= 1.38.1) rubocop-capybara (= 2.21.0) - rubocop-rails (= 2.28.0) - rubocop-rake (= 0.6.0) - rubocop-rspec (= 3.3.0) - rubocop-rails (2.28.0) + rubocop-rails (= 2.30.3) + rubocop-rake (= 0.7.1) + rubocop-rspec (= 3.5.0) + rubocop-rails (2.30.3) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rake (0.6.0) - rubocop (~> 1.0) - rubocop-rspec (3.3.0) - rubocop (~> 1.61) + rubocop (>= 1.72.1, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-rspec (3.5.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.4.1) diff --git a/test/integration/api_users_test.rb b/test/integration/api_users_test.rb index 89893edbe..cc55b9fb3 100644 --- a/test/integration/api_users_test.rb +++ b/test/integration/api_users_test.rb @@ -59,9 +59,9 @@ class ManageApiUsersTest < ActionDispatch::IntegrationTest assert page.has_selector?("div[role='alert'] input[value='#{token}']") # shows truncated token - assert page.has_selector?("code", text: (token[0..7]).to_s) - assert_not page.has_selector?("code", text: (token[9..-9]).to_s) - assert page.has_selector?("code", text: (token[-8..]).to_s) + assert page.has_selector?("code", text: token[0..7].to_s) + assert_not page.has_selector?("code", text: token[9..-9].to_s) + assert page.has_selector?("code", text: token[-8..].to_s) click_link @api_user.name click_link "Manage permissions" diff --git a/test/service_consumers/pact_helper.rb b/test/service_consumers/pact_helper.rb index 8b00fd804..42352018a 100644 --- a/test/service_consumers/pact_helper.rb +++ b/test/service_consumers/pact_helper.rb @@ -20,10 +20,6 @@ def self.generate(_opts = {}) config.include FactoryBot::Syntax::Methods end -def url_encode(str) - ERB::Util.url_encode(str) -end - def stub_access_token_creation! # This stubs Doorkeeper so can ensure the token we generate is predictable, so we can run # the Pact tests with a dummy bearer token @@ -33,6 +29,8 @@ def stub_access_token_creation! end Pact.service_provider "Signon API" do + include ERB::Util + honours_pact_with "GDS API Adapters" do if ENV["PACT_URI"] pact_uri(ENV["PACT_URI"])