I assume that the controller is named CollectionsController
, and its route to create
action is /collections
(if not, you just have to adapt the example bellow)
And I also assume you are in a request spec
This should work:
post '/collections?api_key=my_key', collection: { name: 'New Collection' }