Skip to content

Commit

Permalink
Merge pull request #244 from winebarrel/add_test_case
Browse files Browse the repository at this point in the history
Add Test_GetQueryResultByID_ArgErr
  • Loading branch information
winebarrel authored Jan 25, 2025
2 parents e954f1e + 3cc53ca commit d99dcb7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,13 @@ func Test_GetQueryResultByID_IOErr(t *testing.T) {
assert.ErrorContains(err, "IO error")
}

func Test_GetQueryResultByID_ArgErr(t *testing.T) {
assert := assert.New(t)
client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey)
err := client.GetQueryResultByID(context.Background(), 1, "", nil)
assert.ErrorContains(err, "out(io.Writer) is nil")
}

func Test_ExecQueryJSON_OK(t *testing.T) {
assert := assert.New(t)
require := require.New(t)
Expand Down

0 comments on commit d99dcb7

Please sign in to comment.