public_test.go: add another test case for /api/v2/tickers

pull/358/head
Vladyslav Burzakovskyy 2020-01-22 14:32:46 +01:00 committed by Martin
parent 4b63b483e4
commit 9455417e8b
1 changed files with 9 additions and 0 deletions

View File

@ -563,6 +563,15 @@ func httpTestsBitcoinType(t *testing.T, ts *httptest.Server) {
`{"ts":7980386400,"rates":{"usd":-1}}`,
},
},
{
name: "apiFiatRates future timestamp, all currencies",
r: newGetRequest(ts.URL + "/api/v2/tickers?timestamp=7980386400"),
status: http.StatusOK,
contentType: "application/json; charset=utf-8",
body: []string{
`{"ts":7980386400,"rates":{}}`,
},
},
{
name: "apiFiatRates get EUR rate (exact timestamp)",
r: newGetRequest(ts.URL + "/api/v2/tickers?timestamp=1574344800&currency=eur"),