Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
fix: don't test for actual object or timestamp as will differ
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbruford committed Aug 5, 2018
1 parent 547b551 commit 55e9c64
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/app/dashboard/ships/ships.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,18 @@ describe('ShipService', () => {
loadout.ShipID = 123456789;
loadout.timestamp = new Date().toUTCString();
fakeJournalService.emit(JournalEvents.loadout, loadout);
expect(inaraService.addEvent).toHaveBeenCalledWith(jasmine.objectContaining(new SetCommanderShipLoadoutEvent(loadout)));

let expected = {
eventTimestamp: jasmine.any(String),
eventName: 'setCommanderShipLoadout',
eventData: jasmine.objectContaining({
shipType: loadout.Ship,
shipGameID: loadout.ShipID,
shipLoadout: jasmine.any(Array)
})
}

expect(inaraService.addEvent).toHaveBeenCalledWith(jasmine.objectContaining(expected));
});

it('should add a delCommanderShip event to the inara service when a ship is sold or not rebought', () => {
Expand Down

0 comments on commit 55e9c64

Please sign in to comment.