Skip to content

Commit

Permalink
test: add load exists
Browse files Browse the repository at this point in the history
  • Loading branch information
siyul-park committed Nov 26, 2023
1 parent 7093c4c commit 46a5c65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ func TestLoader_LoadOne(t *testing.T) {
_, ok = tb.LookupByID(spec2.GetID())
assert.True(t, ok)

r, err = ld.LoadOne(context.Background(), spec2.GetID())
assert.NoError(t, err)
assert.NotNil(t, r)

_, ok = tb.LookupByID(spec2.GetID())
assert.True(t, ok)

st.DeleteOne(context.Background(), storage.Where[ulid.ULID](scheme.KeyID).EQ(spec2.GetID()))

r, err = ld.LoadOne(context.Background(), spec2.GetID())
Expand Down

0 comments on commit 46a5c65

Please sign in to comment.