Skip to content
Snippets Groups Projects
Commit adac2fc5 authored by Giovanne Marcelo's avatar Giovanne Marcelo
Browse files

add remove_items from collection test

parent a7f818a3
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,27 @@ resource 'Collections' do
end
end
delete '/v1/collections/:id/items' do
include_context "authenticate_user"
parameter :items, 'Items belongs to the collection', scope: :collection
let(:id) { @collection.id }
let(:items) { [ { id: @collection_item.id } ] }
let(:raw_post) { params.to_json }
before do
@collection = create(:collection, owner: @user)
@collection_item = create(:collection_item, collection: @collection)
end
example 'Remove items from collection' do
do_request
expect(status).to eq(200)
end
end
post '/v1/collections/:id/like' do
include_context "authenticate_user"
......
FactoryGirl.define do
factory :collection_item do
collection
collectionable
position { rand(0..10) }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment