MCPcopy Index your code
hub / github.com/apache/casbin / TestNewModelFromFile

Function TestNewModelFromFile

model/model_test.go:55–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestNewModelFromFile(t *testing.T) {
56 m, err := NewModelFromFile(basicExample)
57 if err != nil {
58 t.Errorf("model failed to load from file: %s", err)
59 }
60 if m == nil {
61 t.Error("model should not be nil")
62 }
63}
64
65func TestNewModelFromString(t *testing.T) {
66 modelBytes, _ := ioutil.ReadFile(basicExample)

Callers

nothing calls this directly

Calls 2

NewModelFromFileFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…