Add attachments field to one

This commit is contained in:
Bel LaPointe
2020-07-24 11:21:16 -06:00
parent ed3006d359
commit 99fb3bb1c3
5 changed files with 72 additions and 19 deletions

View File

@@ -28,10 +28,13 @@ func TestOneMarshalBSON(t *testing.T) {
one: (One{Name: "hello", Type: "world", Modified: 1}).Query(),
},
"modified changes": {
one: (One{Name: "hello", Type: "world", Modified: 1}),
one: One{Name: "hello", Type: "world", Modified: 1},
},
"w/ connections": {
one: (One{Name: "hello", Type: "world", Modified: 1, Connections: map[string]One{"hi": One{Name: "hi", Relationship: "mom"}}}),
one: One{Name: "hello", Type: "world", Modified: 1, Connections: map[string]One{"hi": One{Name: "hi", Relationship: "mom"}}},
},
"w/ attachments": {
one: One{Name: "hello", Type: "world", Modified: 1, Attachments: map[string]string{"hello": "/world"}},
},
}