Skip to content

Add tests for collections API

Alf Eaton requested to merge test-collections-minimal into master

This adds tests for the collections permissions as they currently exist (as defined in Authsome's blog mode), trying to make as few edits to api_collections.js as possible.

An endpoint is added for updating a collection (TODO: protect more properties?).

The permission for deleting a collection is changed to "delete", and authBearer is added to the middleware for this route.

The tests use async/await to reduce nesting when several API calls are made in sequence, so the transform-async-to-generator babel plugin is added to package.json and .babelrc

Merge request reports