generated from coulomb/repo-seed
Define Markitect action vocabulary
This commit is contained in:
@@ -106,6 +106,15 @@ func TestMarkitectProtectedSystemNamespaceExampleParses(t *testing.T) {
|
||||
if len(got.ResourceTypes) != 8 {
|
||||
t.Fatalf("ResourceTypes len = %d; want 8", len(got.ResourceTypes))
|
||||
}
|
||||
if len(got.Actions) != 8 {
|
||||
t.Fatalf("Actions len = %d; want 8", len(got.Actions))
|
||||
}
|
||||
if got.Actions[0].Name != "read" || got.Actions[0].Capabilities[0] != api.CapabilityView {
|
||||
t.Fatalf("first Action = %+v; want read/View", got.Actions[0])
|
||||
}
|
||||
if got.Actions[5].Name != "export" || got.Actions[5].Capabilities[0] != api.CapabilityExport {
|
||||
t.Fatalf("export Action = %+v; want export/Export", got.Actions[5])
|
||||
}
|
||||
if got.ResourceTypes[0].Name != "knowledge_base" || got.ResourceTypes[0].ScopeLevel != api.ScopeLevelWorkspace {
|
||||
t.Fatalf("first ResourceType = %+v; want knowledge_base Workspace", got.ResourceTypes[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user