From 1fc39c25c3c8fa4a13c42566dd3f0ef8038005f1 Mon Sep 17 00:00:00 2001 From: Misha Gorodnitzky Date: Tue, 28 May 2024 15:34:10 +0100 Subject: [PATCH] Clean up patient creation in session management This was creating an extra session, location, etc, which would sometimes trigger an error if the extra location created had the same name as the one being used in the test. Rare, but still annoying. --- spec/features/session_management_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/features/session_management_spec.rb b/spec/features/session_management_spec.rb index ebaf77cb5..22e9115da 100644 --- a/spec/features/session_management_spec.rb +++ b/spec/features/session_management_spec.rb @@ -47,8 +47,7 @@ def given_my_team_is_running_an_hpv_vaccination_campaign @team = create(:team, :with_one_nurse, :with_one_location) create(:campaign, :hpv, team: @team) @location = @team.locations.first - @patient = create(:patient) - @location.patients << @patient + @patient = create(:patient, location: @location, session: nil) end def when_i_go_to_todays_sessions_as_a_nurse