Skip to content

Commit

Permalink
fix: poi test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
petrot committed Mar 23, 2018
1 parent ac6ae90 commit 93a676c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('GeoSearchService', () => {

let result = await service.searchBox(query).toPromise();

expect(spy).toHaveBeenCalledWith('geo.query.includedInBox', {
expect(spy).toHaveBeenCalledWith('open.geo.query.includedInBox', {
payload: query
});
});
Expand All @@ -70,7 +70,7 @@ describe('GeoSearchService', () => {

let result = await service.searchCircle(query).toPromise();

expect(spy).toHaveBeenCalledWith('geo.query.includedInCircle', {
expect(spy).toHaveBeenCalledWith('open.geo.query.includedInCircle', {
payload: query
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ describe('Poi actions', () => {
let poiData: IPoi;
let poi: Poi;

beforeEach(() => {
id = uuid();
id = uuid(),

beforeEach(() => {
poiData = {
id: id,
lat: 42.25,
lon: 19.32,
elevation: 240,
Expand All @@ -28,7 +29,6 @@ describe('Poi actions', () => {

poiDataStored = {
...poiData,
id,
timestamp: new Date().getTime()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('Poi effects', () => {

describe('savePoi$', () => {
it('should return the id of the created Poi from PoiCreated', () => {
const action = new poiActions.SavePoi(poiFixtures[0]);
const action = new poiActions.SavePoi(new Poi(poiFixtures[0]));
const completion = new poiActions.PoiSaved(newId);
const expected = cold('-b', {b: completion});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as uuid from 'uuid/v4';

export const pois: IPoi[] = [
{
id: uuid(),
lat: 42.25,
lon: 19.32,
elevation: 150,
Expand All @@ -15,6 +16,7 @@ export const pois: IPoi[] = [
}
},
{
id: uuid(),
lat: 44.55,
lon: -19.44,
elevation: 252.1,
Expand All @@ -31,12 +33,10 @@ export const pois: IPoi[] = [
export const poisStored: IPoiStored[] = [
{
...pois[0],
id: uuid(),
timestamp: new Date().getTime()
},
{
...pois[1],
id: uuid(),
timestamp: new Date().getTime()
}
]

0 comments on commit 93a676c

Please sign in to comment.