diff options
author | Matthew Holt <[email protected]> | 2019-12-17 10:11:45 -0700 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-12-17 10:11:45 -0700 |
commit | 6455efa5d327377b41e708a063d1b7a71a131165 (patch) | |
tree | 4532f26949b89a2fa1224dc566af3daa49c55368 /admin_test.go | |
parent | 5ab17a3a371c1f84ef5a649d9310971eb7959271 (diff) | |
download | caddy-6455efa5d327377b41e708a063d1b7a71a131165.tar.gz caddy-6455efa5d327377b41e708a063d1b7a71a131165.zip |
admin: POST /... expands and appends all array elements
Makes it easy to append many items to an array in one command
Diffstat (limited to 'admin_test.go')
-rw-r--r-- | admin_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/admin_test.go b/admin_test.go index e8563b716..cfb4ab7bf 100644 --- a/admin_test.go +++ b/admin_test.go @@ -77,6 +77,12 @@ func TestUnsyncedConfigAccess(t *testing.T) { payload: `"d"`, expect: `{"foo": "jet", "bar": {"aa": "bb"}, "list": ["a", "b", "c", "d"]}`, }, + { + method: "POST", + path: "/list/...", + payload: `["e", "f", "g"]`, + expect: `{"foo": "jet", "bar": {"aa": "bb"}, "list": ["a", "b", "c", "d", "e", "f", "g"]}`, + }, } { err := unsyncedConfigAccess(tc.method, rawConfigKey+tc.path, []byte(tc.payload), nil) |