(t *testing.T)
| 284 | } |
| 285 | |
| 286 | func TestEncodeSimpleJSON(t *testing.T) { |
| 287 | branch := sops.TreeBranch{ |
| 288 | sops.TreeItem{ |
| 289 | Key: "foo", |
| 290 | Value: "bar", |
| 291 | }, |
| 292 | sops.TreeItem{ |
| 293 | Key: "foo", |
| 294 | Value: 3, |
| 295 | }, |
| 296 | sops.TreeItem{ |
| 297 | Key: "bar", |
| 298 | Value: false, |
| 299 | }, |
| 300 | } |
| 301 | out, err := Store{}.jsonFromTreeBranch(branch) |
| 302 | assert.Nil(t, err) |
| 303 | expected, _ := Store{}.treeBranchFromJSON(out) |
| 304 | assert.Equal(t, expected, branch) |
| 305 | } |
| 306 | |
| 307 | func TestEncodeJSONWithEscaping(t *testing.T) { |
| 308 | branch := sops.TreeBranch{ |
nothing calls this directly
no test coverage detected