Skip to content

Commit a76bd45

Browse files
authored
Merge pull request #6503 from NHSDigital/create-clinics-without-registration
Create community clinic sessions without registration
2 parents 1cd2f01 + 477ba8f commit a76bd45

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

app/controllers/class_imports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def set_review_records
200200
school: {
201201
team_locations: :team
202202
},
203-
school_moves: :school_teams
203+
school_moves: :teams
204204
}
205205
]
206206
)

app/lib/clinic_session_factory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ def existing_session
5656
end
5757

5858
def new_session
59-
Session.create!(team_location:, dates: [date])
59+
Session.create!(team_location:, dates: [date], requires_registration: false)
6060
end
6161
end

spec/lib/clinic_session_factory_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
expect(session.team_location.academic_year).to eq(academic_year)
2020
expect(session.dates).to contain_exactly(Date.current)
2121
expect(session.programme_types).to contain_exactly(programme_type)
22+
expect(session.requires_registration).to be(false)
2223
end
2324
end
2425

@@ -98,6 +99,7 @@
9899
expect(session.team_location.academic_year).to eq(academic_year)
99100
expect(session.dates).to contain_exactly(Date.tomorrow)
100101
expect(session.programme_types).to contain_exactly(programme_type)
102+
expect(session.requires_registration).to be(false)
101103
end
102104
end
103105
end

0 commit comments

Comments
 (0)