Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reldredge71 committed Aug 16, 2021
1 parent 1e9fb70 commit 8112460
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/app/branded/step-1/branded-checkout-step-1.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,29 @@ describe('branded checkout step 1', () => {
})
})

describe('onSelectPremiumOption', () => {
beforeEach(() => {
$ctrl.initItemConfig()
$ctrl.premiumCode = '112233'
})

it('premium selected', () => {
$ctrl.premiumSelected = true

$ctrl.onSelectPremiumOption()

expect($ctrl.itemConfig['premium-code']).toEqual($ctrl.premiumCode)
})

it('premium deselected', () => {
$ctrl.premiumSelected = false

$ctrl.onSelectPremiumOption()

expect($ctrl.itemConfig['premium-code']).toEqual(undefined)
})
})

describe('checkSuccessfulSubmission', () => {
beforeEach(() => {
$ctrl.resetSubmission()
Expand Down

0 comments on commit 8112460

Please sign in to comment.