1
0
Fork 0

fix read-only tests (#5479)

This commit is contained in:
Jan 2018-05-29 13:13:51 +02:00 committed by GitHub
parent e6dcff8360
commit d648fd0e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -120,12 +120,12 @@ function readOnly (options) {
// database with only collection access
[200, 'get', '/_db/testdb2/_api/document/testcol2/one', 'test', {}],
[403, 'get', '/_db/testdb2/_api/document/testcol3/one', 'test', {}],
[200, 'get', '/_db/testdb2/_api/document/testcol3/one', 'test', {}],
[403, 'post', '/_db/testdb2/_api/document/testcol2', 'test', {_key: 'wxyz'}],
[403, 'post', '/_db/testdb2/_api/document/testcol3', 'test', {_key: 'wxyz'}],
[200, 'get', '/_db/testdb2/_api/document/testcol2/one', 'test2', {}],
[403, 'get', '/_db/testdb2/_api/document/testcol3/one', 'test2', {}],
[200, 'get', '/_db/testdb2/_api/document/testcol3/one', 'test2', {}],
[202, 'post', '/_db/testdb2/_api/document/testcol2', 'test2', {_key: 'wxyz'}],
[403, 'post', '/_db/testdb2/_api/document/testcol3', 'test2', {_key: 'wxyz'}],
@ -197,7 +197,8 @@ function readOnly (options) {
exports.setup = function (testFns, defaultFns, opts, fnDocs, optionsDoc) {
testFns['readOnly'] = readOnly;
defaultFns.push('readOnly');
for (var attrname in functionsDocumentation) { fnDocs[attrname] = functionsDocumentation[attrname]; }
for (var i = 0; i < optionsDocumentation.length; i++) { optionsDoc.push(optionsDocumentation[i]); }
};