Skip to content

Commit

Permalink
Merge pull request #44 from aryala7/FixTest
Browse files Browse the repository at this point in the history
[fix] fix failing tests
  • Loading branch information
Ja7ad authored Apr 11, 2024
2 parents dd0f5e7 + 0b40c71 commit dd9d86e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package client
import (
"context"
"encoding/json"
"github.com/stretchr/testify/assert"
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/stretchr/testify/assert"
)

var (
Expand Down Expand Up @@ -45,7 +46,7 @@ func Test_ClientRequest(t *testing.T) {
headers := make(map[string]string)
headers["foo"] = "bar"

resp, err := c.Post(ctx, &APIConfig{Host: server.URL}, headers, req)
resp, err := c.Post(ctx, &APIConfig{Host: server.URL, Headers: headers}, req)

assert.Nil(t, err)
assert.Nil(t, resp.GetJSON(response))
Expand Down Expand Up @@ -82,7 +83,7 @@ func Test_ClientWithRateLimitRequest(t *testing.T) {
headers := make(map[string]string)
headers["foo"] = "bar"

resp, err := c.Post(ctx, &APIConfig{Host: server.URL}, headers, req)
resp, err := c.Post(ctx, &APIConfig{Host: server.URL, Headers: headers}, req)

assert.Nil(t, err)
assert.Nil(t, resp.GetJSON(response))
Expand Down

0 comments on commit dd9d86e

Please sign in to comment.