Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default licence view createdBy #1138

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/presenters/return-requirements/view.presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function go (requirementsForReturns) {
startDate: formatLongDate(startDate),
status: _status(status),
createdDate: formatLongDate(createdAt),
createdBy: user ? user.username : ''
createdBy: user ? user.username : 'Migrated from NALD'
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/presenters/return-requirements/view.presenter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Return Requirements - View presenter', () => {
additionalSubmissionOptions: {
multipleUpload: 'No'
},
createdBy: '',
createdBy: 'Migrated from NALD',
createdDate: '1 December 2020',
licenceId: 'c32ab7c6-e342-47b2-9c2e-d178ca89c5e5',
licenceRef: '02/01',
Expand Down Expand Up @@ -116,10 +116,10 @@ describe('Return Requirements - View presenter', () => {

describe('the "createdBy" property', () => {
describe('and there is no user linked to the return', () => {
it('returns an empty string', () => {
it('returns "Migrated from NALD" ', () => {
const result = ViewPresenter.go(requirementsForReturns)

expect(result.createdBy).to.equal('')
expect(result.createdBy).to.equal('Migrated from NALD')
})
})
describe('and there is a user linked to the return', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/services/return-requirements/view.service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Return Requirements - View service', () => {
additionalSubmissionOptions: {
multipleUpload: 'No'
},
createdBy: '',
createdBy: 'Migrated from NALD',
createdDate: returnVersion.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: 'long', day: 'numeric' }),
licenceId: licence.id,
licenceRef: result.licenceRef,
Expand Down
Loading