Skip to content

Commit

Permalink
review comments: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Dec 7, 2023
1 parent f904c8f commit c9b3f04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/obscuroscan/obscuroscan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ func TestObscuroscan(t *testing.T) {
assert.NoError(t, err)
assert.LessOrEqual(t, 9, len(batchlistingObj.Result.BatchesData))
assert.LessOrEqual(t, uint64(9), batchlistingObj.Result.Total)
// check results are descending order (latest first)
assert.LessOrEqual(t, batchlistingObj.Result.BatchesData[1].Number.Cmp(batchlistingObj.Result.BatchesData[0].Number), 0)
// check "hash" field is included in json response
assert.Contains(t, string(body), "\"hash\"")

statusCode, body, err = fasthttp.Get(nil, fmt.Sprintf("%s/items/blocks/?offset=0&size=10", serverAddress))
assert.NoError(t, err)
Expand Down

0 comments on commit c9b3f04

Please sign in to comment.