MCPcopy Create free account
hub / github.com/davecheney/pub / MockInstance

Function MockInstance

models/models_test.go:65–72  ·  view source on GitHub ↗
(t *testing.T, tx *gorm.DB, domain string)

Source from the content-addressed store, hash-verified

63}
64
65func MockInstance(t *testing.T, tx *gorm.DB, domain string) *Instance {
66 t.Helper()
67 require := require.New(t)
68
69 instance, err := NewInstances(tx).Create("example.com", "Example", "Example instance", "admin@example.com")
70 require.NoError(err)
71 return instance
72}
73
74func setupTestDB(t *testing.T) *gorm.DB {
75 t.Helper()

Callers 2

TestInstancesFunction · 0.85
TestAccountsFunction · 0.85

Calls 2

NewInstancesFunction · 0.85
CreateMethod · 0.45

Tested by

no test coverage detected