From 4fa8fecb7806ec0ea7c925b13a2b74dcc69d5c9d Mon Sep 17 00:00:00 2001 From: Josh Keegan Date: Thu, 21 Nov 2024 16:55:59 +0000 Subject: [PATCH] Fix subscriptions tests deactivated assertion expected value updated to ptr, since the field was changed to be a *bool. Updated record type subscribed to in tests from "PaymentSubmission" to "payment_submissions". This snake_case resource name is what's used in newer cloud-agnostic stacks. Since that is now the majority of stacks deployed, I've updated it to the new style. --- pkg/form3/subscriptions_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/form3/subscriptions_test.go b/pkg/form3/subscriptions_test.go index bd1e2b8e..4e0ddf05 100644 --- a/pkg/form3/subscriptions_test.go +++ b/pkg/form3/subscriptions_test.go @@ -16,7 +16,7 @@ func TestCreateSubscriptionsDeprecatedCallbackUriParams(t *testing.T) { transport := models.CallbackTransportHTTP callbackURI := "https://webhook.site/db28eac0-d0a5-4078-b9be-0e4617471b01" eventType := "created" - recordType := "PaymentSubmission" + recordType := "payment_submissions" testCreateAndUpdateSubscriptions(t, &models.SubscriptionAttributes{ CallbackTransport: transport, @@ -31,7 +31,7 @@ func TestCreateSubscriptionsNewCallbackUriParams(t *testing.T) { transport := models.CallbackTransportHTTP callbackURI := "https://webhook.site/db28eac0-d0a5-4078-b9be-0e4617471b01" eventType := "created" - recordType := "PaymentSubmission" + recordType := "payment_submissions" testCreateAndUpdateSubscriptions(t, &models.SubscriptionAttributes{ CallbackUris: []*models.CallbackURI{{ @@ -48,7 +48,7 @@ func TestCreateSubscriptionsNewCallbackUriParamsHttpAwsPrivate(t *testing.T) { transport := models.CallbackTransportHTTPAwsPrivate callbackURI := "https://webhook.site/db28eac0-d0a5-4078-b9be-0e4617471b01" eventType := "created" - recordType := "PaymentSubmission" + recordType := "payment_submissions" testCreateAndUpdateSubscriptions(t, &models.SubscriptionAttributes{ CallbackUris: []*models.CallbackURI{{ @@ -98,7 +98,7 @@ func testCreateAndUpdateSubscriptions(t *testing.T, attributes *models.Subscript updateResp, err := updateReq.Do() require.NoError(t, err) assert.Equal(t, id.String(), updateResp.Data.ID.String()) - assert.Equal(t, true, updateResp.Data.Attributes.Deactivated) + assert.Equal(t, &deactivated, updateResp.Data.Attributes.Deactivated) //delete _, err = f3.Subscriptions.DeleteSubscription().WithID(id).WithVersion(version + 1).Do()