(t *testing.T)
| 1470 | } |
| 1471 | |
| 1472 | func TestUnsetArrayItemOutOfBounds(t *testing.T) { |
| 1473 | branch := TreeBranch{ |
| 1474 | TreeItem{ |
| 1475 | Key: "foo", |
| 1476 | Value: []interface{}{ |
| 1477 | TreeBranch{ |
| 1478 | TreeItem{ |
| 1479 | Key: "bar", |
| 1480 | Value: "bar", |
| 1481 | }, |
| 1482 | }, |
| 1483 | }, |
| 1484 | }, |
| 1485 | } |
| 1486 | unset, err := branch.Unset([]interface{}{"foo", 99}) |
| 1487 | assert.Equal(t, err.(*SopsKeyNotFound).Key, 99) |
| 1488 | assert.Nil(t, unset, "Unset result was not nil upon %s", err) |
| 1489 | } |
| 1490 | |
| 1491 | func TestUnsetKeyNotABranch(t *testing.T) { |
| 1492 | branch := TreeBranch{ |