Skip to content

Commit

Permalink
fix: product detail tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG committed Jan 21, 2024
1 parent 2be6452 commit cd66136
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('ProductDetailComponent', () => {

it('should behave correctly onCancel in new mode', () => {
spyOn(component, 'close')
component.changeMode = 'NEW'
component.changeMode = 'CREATE'

component.onCancel()

Expand All @@ -202,15 +202,15 @@ describe('ProductDetailComponent', () => {
it('should behave correctly onNameChange if change true', () => {
spyOn(component, 'close')

component.onNameChange(true)
component.onChange(true)

expect(component.close).toHaveBeenCalled()
})

it('should behave correctly onNameChange if change false', () => {
spyOn(component, 'getProduct')

component.onNameChange(false)
component.onChange(false)

expect(component.getProduct).toHaveBeenCalled()
})
Expand Down

0 comments on commit cd66136

Please sign in to comment.