Skip to content

Commit

Permalink
Update test database
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed May 9, 2022
1 parent a44fee8 commit a1abeb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions core/models/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
Binary file modified mailroom_test.dump
Binary file not shown.

0 comments on commit a1abeb4

Please sign in to comment.