// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`apiMethods checkScore checks score 1`] = `
Object {
  "score": 1000,
}
`;

exports[`apiMethods checkScore checks score 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/score",
      Object {
        "body": "{\\"point1\\":\\"point1\\",\\"point2\\":\\"point2\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods checkScore passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/score",
      Object {
        "body": "{\\"point1\\":\\"point1\\",\\"point2\\":\\"point2\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods checkScore throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/score",
      Object {
        "body": "{\\"point1\\":\\"point1\\",\\"point2\\":\\"point2\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods createGame creates game 1`] = `"test-game-id"`;

exports[`apiMethods createGame creates game 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game",
      Object {
        "body": "{\\"timer\\":\\"timer\\",\\"rounds\\":\\"rounds\\",\\"countryLock\\":\\"countryLock\\",\\"generationMethod\\":\\"generationMethod\\",\\"ruleSet\\":\\"ruleSet\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "PUT",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods createGame passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game",
      Object {
        "body": "{\\"timer\\":\\"timer\\",\\"rounds\\":\\"rounds\\",\\"countryLock\\":\\"countryLock\\",\\"generationMethod\\":\\"generationMethod\\",\\"ruleSet\\":\\"ruleSet\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "PUT",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods createGame throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game",
      Object {
        "body": "{\\"timer\\":\\"timer\\",\\"rounds\\":\\"rounds\\",\\"countryLock\\":\\"countryLock\\",\\"generationMethod\\":\\"generationMethod\\",\\"ruleSet\\":\\"ruleSet\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "PUT",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getCurrentRound gets current round 1`] = `
Object {
  "round": "test-round",
}
`;

exports[`apiMethods getCurrentRound gets current round 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/players/test-player-id/current",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getCurrentRound passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/players/test-player-id/current",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getCurrentRound throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/players/test-player-id/current",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getFirstSubmitter gets first submmiter for a round 1`] = `"test-player"`;

exports[`apiMethods getFirstSubmitter gets first submmiter for a round 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/round/first",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getFirstSubmitter passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/round/first",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getFirstSubmitter returns null on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/round/first",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getGameConfig gets game config 1`] = `
Object {
  "config": "test-config",
}
`;

exports[`apiMethods getGameConfig gets game config 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/config",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getGameConfig passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/config",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getGameConfig throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/config",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getGameCoords gets game coords 1`] = `
Object {
  "coords": Array [
    "test-coord",
  ],
}
`;

exports[`apiMethods getGameCoords gets game coords 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/coords",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getGameCoords passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/coords",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getGameCoords throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/coords",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getGenerators gets generators 1`] = `
Object {
  "generators": Array [],
}
`;

exports[`apiMethods getGenerators gets generators 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/generators",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getGenerators passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/generators",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getGenerators throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/generators",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getLinkedGame gets linked game 1`] = `
Array [
  "test-linked-game-id",
]
`;

exports[`apiMethods getLinkedGame gets linked game 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/linked",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getLinkedGame passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/linked",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getLinkedGame throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/linked",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getPlayers gets game players 1`] = `
Array [
  "test-player",
]
`;

exports[`apiMethods getPlayers gets game players 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/players",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getPlayers passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/players",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods getPlayers throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/players",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getStatus gets status 1`] = `
Object {
  "status": "healthy",
  "version": "test",
}
`;

exports[`apiMethods getStatus gets status 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/health",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getStatus handles server error 1`] = `
Object {
  "status": "failed",
  "version": null,
}
`;

exports[`apiMethods getStatus handles server error 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/health",
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods getStatus handles thrown error 1`] = `
Object {
  "status": "error",
  "version": null,
}
`;

exports[`apiMethods getStatus handles thrown error 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/health",
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods joinGame joins game 1`] = `
Object {
  "playerId": "test-player-id",
}
`;

exports[`apiMethods joinGame joins game 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/join",
      Object {
        "body": "{\\"playerName\\":\\"test-player-name\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods joinGame passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/join",
      Object {
        "body": "{\\"playerName\\":\\"test-player-name\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods joinGame throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/join",
      Object {
        "body": "{\\"playerName\\":\\"test-player-name\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods linkGame links game to another 1`] = `undefined`;

exports[`apiMethods linkGame links game to another 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/linked",
      Object {
        "body": "{\\"linkedGame\\":\\"test-linked-game-id\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "PUT",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods linkGame passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/linked",
      Object {
        "body": "{\\"linkedGame\\":\\"test-linked-game-id\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "PUT",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods linkGame throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/linked",
      Object {
        "body": "{\\"linkedGame\\":\\"test-linked-game-id\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "PUT",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods sendGuess passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/test-round/guess/test-player-id",
      Object {
        "body": "{\\"timeRemaining\\":\\"test-time\\",\\"lat\\":\\"lat\\",\\"lng\\":\\"lng\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods sendGuess sends a guess 1`] = `
Object {
  "score": 1000,
  "totalScore": 5000,
}
`;

exports[`apiMethods sendGuess sends a guess 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/test-round/guess/test-player-id",
      Object {
        "body": "{\\"timeRemaining\\":\\"test-time\\",\\"lat\\":\\"lat\\",\\"lng\\":\\"lng\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods sendGuess throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/test-round/guess/test-player-id",
      Object {
        "body": "{\\"timeRemaining\\":\\"test-time\\",\\"lat\\":\\"lat\\",\\"lng\\":\\"lng\\"}",
        "headers": Object {
          "Content-Type": "application/json",
        },
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods sendtimeout passes thrown error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/test-round/timeout/test-player-id",
      Object {
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "throw",
      "value": [Error: error],
    },
  ],
}
`;

exports[`apiMethods sendtimeout sends a timeout for the round 1`] = `
Object {
  "score": 0,
  "totalScore": 2000,
}
`;

exports[`apiMethods sendtimeout sends a timeout for the round 2`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/test-round/timeout/test-player-id",
      Object {
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;

exports[`apiMethods sendtimeout throws on server error 1`] = `
[MockFunction] {
  "calls": Array [
    Array [
      "https://hiram.services/terrassumptions/api/game/test-game-id/round/test-round/timeout/test-player-id",
      Object {
        "method": "POST",
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
`;
