Working but i shouldve made connections a map
This commit is contained in:
@@ -30,6 +30,9 @@ func TestOneMarshalBSON(t *testing.T) {
|
||||
"modified changes": {
|
||||
one: (One{Name: "hello", Type: "world", Modified: 1}),
|
||||
},
|
||||
"w/ connections": {
|
||||
one: (One{Name: "hello", Type: "world", Modified: 1, Connections: []One{One{Name: "hi", Relationship: "mom"}}}),
|
||||
},
|
||||
}
|
||||
|
||||
for name, d := range cases {
|
||||
@@ -53,6 +56,9 @@ func TestOneMarshalBSON(t *testing.T) {
|
||||
}
|
||||
c.one.Modified = 0
|
||||
one.Modified = 0
|
||||
for i := range one.Connections {
|
||||
one.Connections[i].Modified = 0
|
||||
}
|
||||
if fmt.Sprint(c.one) != fmt.Sprint(one) {
|
||||
t.Error(c.one, one)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user