diff --git a/store_test.go b/store_test.go index 1269b89..7f8548e 100644 --- a/store_test.go +++ b/store_test.go @@ -101,10 +101,12 @@ func TestStore_Claim(t *testing.T) { t.Errorf("Store.Claim() error = %v, wantErr %v", err, tt.wantErr) } - ae, err := store.LastOf(context.TODO(), EventClaim) - require.NoError(t, err) - assert.Greater(t, ae.Id, lastAudit) - lastAudit = ae.Id + if !tt.wantErr { + ae, err := store.LastOf(context.TODO(), EventClaim) + require.NoError(t, err) + assert.Greater(t, ae.Id, lastAudit) + lastAudit = ae.Id + } }) } }