Simplify error assertion
Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>
This commit is contained in:
parent
81c89c3949
commit
9af7d5e75e
1 changed files with 1 additions and 6 deletions
|
@ -46,12 +46,7 @@ func TestDiscover(t *testing.T) {
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got, err := Discover(context.Background(), tt.args.issuer, http.DefaultClient, tt.args.wellKnownUrl...)
|
got, err := Discover(context.Background(), tt.args.issuer, http.DefaultClient, tt.args.wellKnownUrl...)
|
||||||
if tt.wantErr != nil {
|
require.ErrorIs(t, err, tt.wantErr)
|
||||||
assert.ErrorIs(t, err, tt.wantErr)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
require.NoError(t, err)
|
|
||||||
if tt.wantFields == nil {
|
if tt.wantFields == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue