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 {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := Discover(context.Background(), tt.args.issuer, http.DefaultClient, tt.args.wellKnownUrl...)
|
||||
if tt.wantErr != nil {
|
||||
assert.ErrorIs(t, err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
|
||||
require.NoError(t, err)
|
||||
require.ErrorIs(t, err, tt.wantErr)
|
||||
if tt.wantFields == nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue