MCPcopy
hub / github.com/redspread/spread / TestSourceInvalidEntity

Function TestSourceInvalidEntity

pkg/input/dir/source_test.go:89–97  ·  view source on GitHub ↗

TODO: Add tests for entities in wrong folders

(t *testing.T)

Source from the content-addressed store, hash-verified

87// TODO: Add tests for entities in wrong folders
88
89func TestSourceInvalidEntity(t *testing.T) {
90 fs := testTempFileSource(t)
91 defer os.RemoveAll(string(fs))
92
93 // create an invalid entity.Type
94 invalidEntityType := entity.Type(42)
95 _, err := fs.Entities(invalidEntityType)
96 assert.EqualError(t, err, ErrInvalidType.Error(), "should error for invalid entity types")
97}
98
99func TestSourceEntitiesNoFile(t *testing.T) {
100 fs := testTempFileSource(t)

Callers

nothing calls this directly

Calls 3

testTempFileSourceFunction · 0.85
EntitiesMethod · 0.80
TypeMethod · 0.65

Tested by

no test coverage detected