(t *testing.T)
| 1286 | } |
| 1287 | |
| 1288 | func TestUnsetKeyBranchLastLeaf(t *testing.T) { |
| 1289 | branch := TreeBranch{ |
| 1290 | TreeItem{ |
| 1291 | Key: "foo", |
| 1292 | Value: TreeBranch{ |
| 1293 | TreeItem{ |
| 1294 | Key: "bar", |
| 1295 | Value: "bar", |
| 1296 | }, |
| 1297 | }, |
| 1298 | }, |
| 1299 | } |
| 1300 | unset, err := branch.Unset([]interface{}{"foo", "bar"}) |
| 1301 | assert.NoError(t, err) |
| 1302 | assert.Equal(t, TreeBranch{ |
| 1303 | TreeItem{ |
| 1304 | Key: "foo", |
| 1305 | Value: TreeBranch{}, |
| 1306 | }, |
| 1307 | }, unset) |
| 1308 | } |
| 1309 | |
| 1310 | func TestUnsetKeyArray(t *testing.T) { |
| 1311 | branch := TreeBranch{ |