Skip to content

Commit

Permalink
Update version regex to include rc versions as well
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere authored Dec 7, 2023
1 parent 41031fa commit 3ece76a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func TestClient_SetAccountSid(t *testing.T) {
func TestClient_DefaultUserAgentHeaders(t *testing.T) {
headerServer := httptest.NewServer(http.HandlerFunc(
func(writer http.ResponseWriter, request *http.Request) {
assert.Regexp(t, regexp.MustCompile(`^twilio-go/[0-9.]+\s\(\w+\s\w+\)\sgo/\S+$`), request.Header.Get("User-Agent"))
assert.Regexp(t, regexp.MustCompile(`^twilio-go/[0-9.]+(-rc.[0-9])*\s\(\w+\s\w+\)\sgo/\S+$`), request.Header.Get("User-Agent"))
}))

resp, _ := testClient.SendRequest("GET", headerServer.URL, nil, nil)
Expand Down

0 comments on commit 3ece76a

Please sign in to comment.