(t *testing.T)
| 193 | } |
| 194 | |
| 195 | func TestDecodeNestedJSONObject(t *testing.T) { |
| 196 | in := `{"foo": {"foo": "bar"}}` |
| 197 | expected := sops.TreeBranch{ |
| 198 | sops.TreeItem{ |
| 199 | Key: "foo", |
| 200 | Value: sops.TreeBranch{ |
| 201 | sops.TreeItem{ |
| 202 | Key: "foo", |
| 203 | Value: "bar", |
| 204 | }, |
| 205 | }, |
| 206 | }, |
| 207 | } |
| 208 | branch, err := Store{}.treeBranchFromJSON([]byte(in)) |
| 209 | assert.Nil(t, err) |
| 210 | assert.Equal(t, expected, branch) |
| 211 | } |
| 212 | |
| 213 | func TestDecodeJSONWithArray(t *testing.T) { |
| 214 | in := `{"foo": {"foo": [1, 2, 3]}, "bar": "baz"}` |
nothing calls this directly
no test coverage detected