Skip to content

Commit 37c6603

Browse files
committed
Update spec files
1 parent 0acc0a5 commit 37c6603

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

spec/features/cli_teams_reset_national_reporting_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ def and_a_patient_is_associated_with_both_teams
262262
:vaccination_record,
263263
team: @point_of_care_team,
264264
patient: @shared_patient,
265-
performed_at: 2.days.ago
265+
performed_at: 2.days.ago,
266+
session: create(:session, team: @point_of_care_team)
266267
)
267268
end
268269

spec/features/import_vaccination_records_national_reporting_spec.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def given_mavis_logins_are_configured
6161
ods_code: "R1L",
6262
programmes: programmes
6363
)
64-
create(:school, team: @team, urn: 100_000)
64+
@school = create(:school, team: @team, urn: 100_000)
6565
end
6666

6767
def given_i_am_signed_in_as_a_national_reporting_user
@@ -81,7 +81,12 @@ def given_a_patient_already_exists
8181
)
8282

8383
# Create a vaccination record to link this patient with the team
84-
create(:vaccination_record, patient: @existing_patient, team: @team)
84+
create(
85+
:vaccination_record,
86+
patient: @existing_patient,
87+
team: @team,
88+
session: create(:session, team: @team, location: @school)
89+
)
8590
end
8691

8792
def and_sending_to_nhs_immunisations_api_is_enabled

spec/features/national_reporting_team_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def given_i_am_signed_in_as_an_national_reporting_team
6363
programmes: [Programme.flu, Programme.hpv],
6464
ods_code: "XX99"
6565
)
66-
create(:school, team: @team, urn: 100_000)
66+
@school = create(:school, team: @team, urn: 100_000)
6767
sign_in @team.users.first
6868
end
6969

@@ -80,6 +80,7 @@ def and_there_is_a_child_with_parents
8080
:vaccination_record,
8181
programme: Programme.flu,
8282
patient: @child_with_parents,
83+
session: create(:session, team: @team, location: @school),
8384
team: @team
8485
)
8586
end

spec/policies/patient_policy_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
)
144144
end
145145

146-
it { should contain_exactly(patient_with_vaccination_record) }
146+
it { should be_empty }
147147
end
148148
end
149149
end

0 commit comments

Comments
 (0)