mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
rename shuttle data fetch snapshot
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Snapshot taken from the Passio GO! API
|
||||
export const genericShuttleDataBySystemId = {
|
||||
export const fetchShuttleDataSuccessfulResponse = {
|
||||
"alertCRC": "23c1b91c",
|
||||
"buses": {
|
||||
"402840": [
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from "../../src/repositories/ApiBasedRepository";
|
||||
import { IEta, IShuttle, IStop } from "../../src/entities/entities";
|
||||
import { genericEtaDataByStopId } from "../jsonSnapshots/genericEtaDataBySystemId";
|
||||
import { genericShuttleDataBySystemId } from "../jsonSnapshots/genericShuttleDataBySystemId";
|
||||
import { fetchShuttleDataSuccessfulResponse } from "../jsonSnapshots/fetchShuttleData/fetchShuttleDataSuccessfulResponse";
|
||||
|
||||
/**
|
||||
* Update the global fetch function to return a specific object.
|
||||
@@ -290,7 +290,7 @@ describe("updateEtasForSystemIfTTL", () => {
|
||||
|
||||
describe("getShuttleById", () => {
|
||||
test("getShuttleById returns null if unseeded cache", async () => {
|
||||
updateGlobalFetchMockJson(genericShuttleDataBySystemId);
|
||||
updateGlobalFetchMockJson(fetchShuttleDataSuccessfulResponse);
|
||||
|
||||
const initialCache: ApiBasedRepositoryCache = {};
|
||||
const repository = new ApiBasedRepository(initialCache);
|
||||
@@ -300,7 +300,7 @@ describe("getShuttleById", () => {
|
||||
});
|
||||
|
||||
test("getShuttleById returns data if present", async () => {
|
||||
updateGlobalFetchMockJson(genericShuttleDataBySystemId);
|
||||
updateGlobalFetchMockJson(fetchShuttleDataSuccessfulResponse);
|
||||
|
||||
const initialCacheShuttle = {
|
||||
coordinates: {
|
||||
|
||||
Reference in New Issue
Block a user