Skip to content

Commit

Permalink
EDSC-3930: Update test to redirect to not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
eudoroolivares2016 committed Dec 5, 2023
1 parent 2397e47 commit a82b6ba
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('AuthCallbackContainer component', () => {
expect(setSpy).toBeCalledTimes(0)

expect(window.location.replace.mock.calls.length).toBe(1)
expect(window.location.replace.mock.calls[0]).toEqual(['/'])
expect(window.location.replace.mock.calls[0]).toEqual(['/not-found'])
})

test('does not follow the redirect if the redirect param is not relative to earthdata-search', () => {
Expand All @@ -171,7 +171,7 @@ describe('AuthCallbackContainer component', () => {
expect(setSpy).toBeCalledTimes(0)

expect(window.location.replace.mock.calls.length).toBe(1)
expect(window.location.replace.mock.calls[0]).toEqual(['/'])
expect(window.location.replace.mock.calls[0]).toEqual(['/not-found'])
})

test('does not follow the redirect if the eddRedirect param is not valid', () => {
Expand All @@ -188,6 +188,6 @@ describe('AuthCallbackContainer component', () => {
expect(setSpy).toBeCalledTimes(0)

expect(window.location.replace.mock.calls.length).toBe(1)
expect(window.location.replace.mock.calls[0]).toEqual(['/'])
expect(window.location.replace.mock.calls[0]).toEqual(['/not-found'])
})
})

0 comments on commit a82b6ba

Please sign in to comment.