diff --git a/patch_test.go b/patch_test.go index 30f6176..66e5bd3 100644 --- a/patch_test.go +++ b/patch_test.go @@ -336,6 +336,11 @@ var BadCases = []BadCase{ `{ "baz": "qux" }`, `[ { "op": "replace", "path": "/foo", "value": "bar" } ]`, }, + // Can't copy from non-existent "from" key. + { + `{ "foo": "bar"}`, + `[{"op": "copy", "path": "/qux", "from": "/baz"}]`, + }, } // This is not thread safe, so we cannot run patch tests in parallel.