diff --git a/src/app/branded/step-1/branded-checkout-step-1.spec.js b/src/app/branded/step-1/branded-checkout-step-1.spec.js index f08f41e03..e81faa748 100644 --- a/src/app/branded/step-1/branded-checkout-step-1.spec.js +++ b/src/app/branded/step-1/branded-checkout-step-1.spec.js @@ -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()