Skip to content

Commit

Permalink
SHIBUI-1352 Fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jul 11, 2019
1 parent 5dcf0ea commit 52f6c77
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ describe('Dashboard Providers List Page', () => {

describe('edit method', () => {
it('should route to the edit page', () => {
const evt = new Event('a type');
spyOn(router, 'navigate');
instance.edit(provider);
spyOn(evt, 'preventDefault');
instance.edit(provider, evt);
expect(evt.preventDefault).toHaveBeenCalled();
expect(router.navigate).toHaveBeenCalledWith(['metadata', 'provider', provider.resourceId, 'edit']);
});
});
Expand Down

0 comments on commit 52f6c77

Please sign in to comment.