diff --git a/core/models/assets_test.go b/core/models/assets_test.go index 9d3321734..6d6d95d3e 100644 --- a/core/models/assets_test.go +++ b/core/models/assets_test.go @@ -15,15 +15,9 @@ import ( ) func TestAssets(t *testing.T) { - ctx, rt, db, _ := testsuite.Get() - - defer testsuite.Reset(testsuite.ResetData) + ctx, rt, _, _ := testsuite.Get() - // create new flow with same name as an existing flow - testdata.InsertFlow(db, testdata.Org1, []byte(`{ - "uuid": "fd7d16dd-3a38-4351-aea6-7a80acb41dd9", - "name": "Pick a Number" - }`)) + defer models.FlushCache() oa, err := models.GetOrgAssets(ctx, rt, testdata.Org1.ID) require.NoError(t, err) @@ -42,7 +36,6 @@ func TestAssets(t *testing.T) { flow, err = oa.FlowByName("PICK A NUMBER") // from db assert.NoError(t, err) - assert.Equal(t, assets.FlowUUID("fd7d16dd-3a38-4351-aea6-7a80acb41dd9"), flow.UUID()) // new flow as newer saved_on assert.Equal(t, "Pick a Number", flow.Name()) flow, err = oa.FlowByName("pick a number") // from cache diff --git a/mailroom_test.dump b/mailroom_test.dump index d62d2465c..0bb289543 100644 Binary files a/mailroom_test.dump and b/mailroom_test.dump differ