JSON API new spec with deref
This commit is contained in:
@@ -34,7 +34,7 @@ func TestIntegration(t *testing.T) {
|
||||
randomOne(),
|
||||
randomOne(),
|
||||
}
|
||||
ones[0].Connections = []entity.Peer{entity.Peer{Name: ones[2].Name, Relationship: ":("}}
|
||||
ones[0].Connections = []entity.One{entity.One{Name: ones[2].Name, Relationship: ":("}}
|
||||
|
||||
t.Run("graph.Insert(...)", func(t *testing.T) {
|
||||
for _, one := range ones {
|
||||
@@ -91,7 +91,7 @@ func TestIntegration(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("graph.Update(foo, ++...); graph.Update(foo, --if :()", func(t *testing.T) {
|
||||
err := graph.Update(ctx, ones[0].Query(), operator.Set{entity.Connections, []entity.Peer{entity.Peer{Name: "hello", Relationship: ":("}}})
|
||||
err := graph.Update(ctx, ones[0].Query(), operator.Set{entity.Connections, []entity.One{entity.One{Name: "hello", Relationship: ":("}}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -139,6 +139,6 @@ func randomOne() entity.One {
|
||||
Image: "/path/to.jpg",
|
||||
Text: "tee hee xd",
|
||||
Modified: time.Now().UnixNano(),
|
||||
Connections: []entity.Peer{},
|
||||
Connections: []entity.One{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user