Skip to content

Commit

Permalink
APS-910: Tweak success message on creation of OOSB
Browse files Browse the repository at this point in the history
The next commit will include redirection to the "v2" bed page
(`/manage/premises/{premisesId}/bed/{bedId}`).
  • Loading branch information
edavey committed Jul 4, 2024
1 parent 1596edc commit 7260529
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration_tests/tests/v2Manage/outOfServiceBeds.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ context('OutOfServiceBeds', () => {
})

// And I should be navigated to the premises detail page and see the confirmation message
page.shouldShowBanner('Out of service bed logged')
page.shouldShowBanner('The out of service bed has been recorded')
})

it('should show errors', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('OutOfServiceBedsController', () => {
endDate: '2022-09-22',
bedId: request.params.bedId,
})
expect(request.flash).toHaveBeenCalledWith('success', 'Out of service bed logged')
expect(request.flash).toHaveBeenCalledWith('success', 'The out of service bed has been recorded')
expect(response.redirect).toHaveBeenCalledWith(paths.premises.show({ premisesId: request.params.premisesId }))
})

Expand Down
2 changes: 1 addition & 1 deletion server/controllers/manage/outOfServiceBedsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class OutOfServiceBedsController {
try {
await this.outOfServiceBedService.createOutOfServiceBed(req.user.token, premisesId, outOfServiceBed)

req.flash('success', 'Out of service bed logged')
req.flash('success', 'The out of service bed has been recorded')
return res.redirect(paths.premises.show({ premisesId }))
} catch (error) {
const redirectPath = paths.v2Manage.outOfServiceBeds.new({ premisesId, bedId })
Expand Down

0 comments on commit 7260529

Please sign in to comment.