json-patch / json-patch-tests

Tests for implementations of json-patch
68 stars 21 forks source link

Disable replace root document tests #18

Closed sonnyp closed 9 years ago

sonnyp commented 9 years ago

I'm wondering if the following tests

shouldn't be disabled by default.

It seems rather implementation specific and as far as I know the expected behavior isn't specified in the RFC.

On a similar subject, the test for testing the all document is disabled. Whole document Not sure why though, contrary to the previous mentioned it looks rather straightforward.

mikemccabe commented 9 years ago

Thanks for the interest! These are in the spec, so they should stay in the tests.

mikemccabe commented 9 years ago

Relevant bit:

For example:

{ "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] }

When the operation is applied, the target location MUST reference one of:

o The root of the target document - whereupon the specified value becomes the entire content of the target document.

...

sonnyp commented 9 years ago

my bad, missed it

thanks

What about https://github.com/json-patch/json-patch-tests/blob/master/tests.json#L229 should it be enabled?