From f482f4e2a006c99bab323b4fcd04e4a104957858 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Wed, 11 Oct 2023 10:09:46 +0200 Subject: [PATCH] test: add test for consent double-submit --- consent/manager_test_helpers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/consent/manager_test_helpers.go b/consent/manager_test_helpers.go index 93f0e00b895..20c50971c6d 100644 --- a/consent/manager_test_helpers.go +++ b/consent/manager_test_helpers.go @@ -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()) }