Skip to content

Commit

Permalink
check only number of rods not type
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Dormand authored and Scott Dormand committed Nov 19, 2024
1 parent 88f935f commit 3770179
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ describe('licence-summary > route', () => {
${'Blue badge concession'} | ${getMockBlueBadgePermission()}
${'Continuing permission'} | ${getMockContinuingPermission()}
${'Another date permission'} | ${{ ...getMockPermission(), licenceToStart: 'another-date' }}
${'1 year new three rod licence '} | ${{ ...getMockNewPermission(), licenceType: 'Trout and coarse', numberOfRods: '3' }}
${'1 year new three rod licence '} | ${{ ...getMockNewPermission(), numberOfRods: '3' }}
`('creates licence summary name rows for $desc', async ({ currentPermission }) => {
const mockRequest = getMockRequest({ currentPermission })
const data = await getData(mockRequest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { CONCESSION, CONCESSION_PROOF } from '../../../processors/mapping-consta
import { nextPage } from '../../../routes/next-page.js'
import { addLanguageCodeToUri } from '../../../processors/uri-helper.js'
import { displayPermissionPrice } from '../../../processors/price-display.js'
import * as mappings from '../../../processors/mapping-constants.js'
import db from 'debug'
const debug = db('webapp:licence-summary')

Expand Down Expand Up @@ -116,7 +115,7 @@ class RowGenerator {
generateLicenceLengthRow () {
const args = ['licence_summary_length', this.labels[`licence_type_${this.permission.licenceLength.toLowerCase()}`]]

if (!(this.permission.licenceType === mappings.LICENCE_TYPE['trout-and-coarse'] && this.permission.numberOfRods === '3')) {
if (this.permission.numberOfRods !== '3') {
args.push(LICENCE_LENGTH.uri, 'change-licence-length')
}

Expand Down

0 comments on commit 3770179

Please sign in to comment.