API: return resource ID for auth key creation, folder permissions update and user invite complete endpoints (#27419)

* API: add ID to auth key and folder endpoints

* API: add test for folder permissions update

* API: add created user id for /invite/complete endpoint
This commit is contained in:
Agnès Toulet
2020-09-07 17:06:11 +02:00
committed by GitHub
parent 61bd33c241
commit 6dd109b927
7 changed files with 20 additions and 5 deletions
+4
View File
@@ -125,6 +125,10 @@ func TestFolderPermissionApiEndpoint(t *testing.T) {
updateFolderPermissionScenario("When calling POST on", "/api/folders/uid/permissions", "/api/folders/:uid/permissions", cmd, func(sc *scenarioContext) {
callUpdateFolderPermissions(sc)
So(sc.resp.Code, ShouldEqual, 200)
respJSON, err := simplejson.NewJson(sc.resp.Body.Bytes())
So(err, ShouldBeNil)
So(respJSON.Get("id").MustInt(), ShouldEqual, 1)
So(respJSON.Get("title").MustString(), ShouldEqual, "Folder")
})
Reset(func() {