From 0138b5ffcbd66d386df641320624681997b9b7b4 Mon Sep 17 00:00:00 2001 From: Stone Filipczak Date: Wed, 28 Aug 2024 09:31:25 -0400 Subject: [PATCH] fun with lint --- spec/requests/dashboard_request_spec.rb | 1 + spec/spec_helper.rb | 10 ++++------ spec/support/shared_examples/utility_menu.rb | 14 ++++++-------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/spec/requests/dashboard_request_spec.rb b/spec/requests/dashboard_request_spec.rb index ae09635d..65c5ebbb 100644 --- a/spec/requests/dashboard_request_spec.rb +++ b/spec/requests/dashboard_request_spec.rb @@ -3,6 +3,7 @@ RSpec.describe "DashboardController" do describe "GET /" do let(:user) { create_and_log_in_user } + before { get "/" } it_behaves_like "a page with footer content" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2eb70f25..49dfc87d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -20,16 +20,14 @@ def create_and_log_in_user email = "testsolver@example.gov" token = SecureRandom.uuid - user = User.create!({ email:, token: }) - code = "ABC123" login_gov = instance_double(LoginGov) allow(LoginGov).to receive(:new).and_return(login_gov) allow(login_gov).to receive(:exchange_token_from_auth_result).with(code).and_return( - [{ email:, sub: token }] - ) + [{ email:, sub: token }] + ) get "/auth/result", params: { code: } - user -end + user +end diff --git a/spec/support/shared_examples/utility_menu.rb b/spec/support/shared_examples/utility_menu.rb index b6e950e5..2237e64f 100644 --- a/spec/support/shared_examples/utility_menu.rb +++ b/spec/support/shared_examples/utility_menu.rb @@ -19,12 +19,10 @@ end RSpec.shared_examples "a page with utility menu links for an evaluator" do - it "has the right links for an evaluator" do - expect(response.body).to include("Dashboard") - expect(response.body).to include("Evaluations") - expect(response.body).to include("User Guides") - expect(response.body).to include("Help") - end + it "has the right links for an evaluator" do + expect(response.body).to include("Dashboard") + expect(response.body).to include("Evaluations") + expect(response.body).to include("User Guides") + expect(response.body).to include("Help") + end end - - \ No newline at end of file