diff --git a/graph/utils_test.go b/graph/utils_test.go index 0e39812..0b68bd7 100644 --- a/graph/utils_test.go +++ b/graph/utils_test.go @@ -1,7 +1,6 @@ package graph_test import ( - "fmt" "regexp" "testing" @@ -20,10 +19,6 @@ func graphReq(expr string) *dsr.GetGraphRequest { return parseRelation(expr).graphReq() } -func invertedGraphReq(expr string) *dsr.GetGraphRequest { - return parseRelation(expr).invert().graphReq() -} - type relation struct { ObjectType model.ObjectName ObjectID model.ObjectID @@ -89,16 +84,6 @@ func (r *relation) graphReq() *dsr.GetGraphRequest { } } -func (r *relation) invert() *relation { - return &relation{ - ObjectType: r.SubjectType, - ObjectID: r.SubjectID, - Relation: model.RelationName(fmt.Sprintf("%s_%s", r.ObjectType, r.Relation)), - SubjectType: r.ObjectType, - SubjectID: r.ObjectID, - } -} - type RelationsReader []*relation func NewRelationsReader(rels ...string) RelationsReader {