Skip to content

Commit 1fc39c2

Browse files
committed
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.
1 parent da03c17 commit 1fc39c2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spec/features/session_management_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def given_my_team_is_running_an_hpv_vaccination_campaign
4747
@team = create(:team, :with_one_nurse, :with_one_location)
4848
create(:campaign, :hpv, team: @team)
4949
@location = @team.locations.first
50-
@patient = create(:patient)
51-
@location.patients << @patient
50+
@patient = create(:patient, location: @location, session: nil)
5251
end
5352

5453
def when_i_go_to_todays_sessions_as_a_nurse

0 commit comments

Comments
 (0)