diff --git a/core/handlers/msg_catalog_created_test.go b/core/handlers/msg_catalog_created_test.go index bfd2ecaa4..b1999d2e0 100644 --- a/core/handlers/msg_catalog_created_test.go +++ b/core/handlers/msg_catalog_created_test.go @@ -66,7 +66,7 @@ func TestMsgCatalogCreated(t *testing.T) { SQLAssertions: []handlers.SQLAssertion{ { SQL: "SELECT COUNT(*) FROM msgs_msg WHERE contact_id = $1 AND metadata = $2 AND high_priority = TRUE", - Args: []interface{}{testdata.Cathy.ID, `{"action":"View Products","body":"Some products","products":["9f526c6f-b2cb-4457-8048-a7f1dc101e50","eb2305cc-bf39-43ad-a069-bbbfb6401acc"]}`}, + Args: []interface{}{testdata.Cathy.ID, `{"action":"View Products","body":"Some products","products":["9f526c6f-b2cb-4457-8048-a7f1dc101e50","eb2305cc-bf39-43ad-a069-bbbfb6401acc"],"send_catalog":false}`}, Count: 2, }, { diff --git a/core/models/catalog_products_test.go b/core/models/catalog_products_test.go index e4389dc53..0b87809f8 100644 --- a/core/models/catalog_products_test.go +++ b/core/models/catalog_products_test.go @@ -2,7 +2,6 @@ package models_test import ( "context" - "fmt" "testing" "time" @@ -37,7 +36,7 @@ func TestCatalogProducts(t *testing.T) { (uuid, facebook_catalog_id, "name", created_on, modified_on, is_active, channel_id, org_id) VALUES('9bbe354d-cea6-408b-ba89-9ce28999da3f', '1234567891', 'Catalog Dummy2', now(), now(), false, $1, $2); `, 123, testdata.Org2.ID) - fmt.Println(err) + assert.NoError(t, err) ctpn, err := models.GetActiveCatalogFromChannel(ctx, *db, 123) @@ -57,5 +56,5 @@ func TestChannelUUIDForChannelID(t *testing.T) { ctp, err := models.ChannelUUIDForChannelID(ctxp, db, testdata.TwilioChannel.ID) assert.NoError(t, err) - assert.Equal(t, ctp, testdata.Org2Channel.UUID) + assert.Equal(t, ctp, testdata.TwilioChannel.UUID) } diff --git a/mailroom_test.dump b/mailroom_test.dump index 3d8169331..de9ab4317 100644 Binary files a/mailroom_test.dump and b/mailroom_test.dump differ diff --git a/services/external/weni/service_test.go b/services/external/weni/service_test.go index d0eb38993..61ffb3fdd 100644 --- a/services/external/weni/service_test.go +++ b/services/external/weni/service_test.go @@ -20,7 +20,9 @@ import ( ) func TestService(t *testing.T) { - _, rt, _, _ := testsuite.Get() + _, rt, db, _ := testsuite.Get() + + catalogs.SetDB(db) defer dates.SetNowSource(dates.DefaultNowSource) session, _, err := test.CreateTestSession("", envs.RedactionPolicyNone)