Skip to content

Commit

Permalink
fixed testcase.
Browse files Browse the repository at this point in the history
  • Loading branch information
developerkunal committed Aug 12, 2024
1 parent 67121d4 commit ee48a05
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions internal/cli/universal_login_customize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"net/http"
"reflect"
"testing"

"github.com/auth0/go-auth0/management"
Expand Down Expand Up @@ -1829,16 +1828,11 @@ func TestFetchAllPartials(t *testing.T) {
actualData, actualError := fetchAllPartials(context.Background(), test.mockedAPI())

if test.expectedError != "" {
if actualError == nil || actualError.Error() != test.expectedError {
t.Errorf("expected error %q, got %q", test.expectedError, actualError)
}
assert.Error(t, actualError)
assert.EqualError(t, actualError, test.expectedError)
} else {
if actualError != nil {
t.Errorf("unexpected error: %v", actualError)
}
if !reflect.DeepEqual(actualData, test.expectedData) {
t.Errorf("expected data %v, got %v", test.expectedData, actualData)
}
assert.NoError(t, actualError)
assert.Equal(t, test.expectedData, actualData)
}
})
}
Expand Down

0 comments on commit ee48a05

Please sign in to comment.