MCPcopy
hub / github.com/daptin/daptin / TestGetReferenceIdToObject

Function TestGetReferenceIdToObject

server/resource_methods_test.go:141–155  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

139}
140
141func TestGetReferenceIdToObject(t *testing.T) {
142
143 wrapper, dbResource := GetResource()
144 defer wrapper.db.Close()
145
146 tx, _ := wrapper.Beginx()
147 defer tx.Rollback()
148 _, _ = dbResource.Cruds["world"].GetReferenceIdToObjectWithTransaction("world", daptinid.DaptinReferenceId(uuid.New()), tx)
149
150 if !wrapper.HasExecuted("SELECT * FROM world WHERE reference_id =") {
151 t.Errorf("Expected query not fired")
152 t.FailNow()
153 }
154
155}
156
157func TestUserGroupNameToId(t *testing.T) {
158

Callers

nothing calls this directly

Calls 5

GetResourceFunction · 0.85
HasExecutedMethod · 0.80
CloseMethod · 0.65
BeginxMethod · 0.65

Tested by

no test coverage detected