MCPcopy
hub / github.com/daptin/daptin / TestGetIdToObject

Function TestGetIdToObject

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

Source from the content-addressed store, hash-verified

198}
199
200func TestGetIdToObject(t *testing.T) {
201
202 wrapper, dbResource := GetResourceWithName("world")
203 defer wrapper.db.Close()
204
205 tx, _ := wrapper.Beginx()
206 defer tx.Rollback()
207 dbResource.GetIdToObject("world", 1, tx)
208
209 if !wrapper.HasExecuted("SELECT * FROM world WHERE id =") {
210 t.Errorf("Expected query not fired")
211 t.FailNow()
212 }
213
214}
215
216func TestGetActionsByType(t *testing.T) {
217

Callers

nothing calls this directly

Calls 5

GetResourceWithNameFunction · 0.85
GetIdToObjectMethod · 0.80
HasExecutedMethod · 0.80
CloseMethod · 0.65
BeginxMethod · 0.65

Tested by

no test coverage detected