Skip to content

Commit

Permalink
test: add test for consent double-submit
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Oct 11, 2023
1 parent 751fa04 commit f482f4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions consent/manager_test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ func ManagerTests(deps Deps, m Manager, clientManager client.Manager, fositeMana
assert.Equal(t, consentRequest.ID, got2.ID)
assert.Equal(t, h.GrantedAudience, got2.GrantedAudience)

t.Run("subcase=detect double-submit for consent verifier", func(t *testing.T) {
_, err := m.VerifyAndInvalidateConsentRequest(ctx, consentVerifier)
require.Error(t, err)
})

if tc.hasError {
assert.True(t, got2.HasError())
}
Expand Down

0 comments on commit f482f4e

Please sign in to comment.