Skip to content
Snippets Groups Projects
Commit 33c5501a authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

removing a bookmark acceptance test

parent 4dc33357
No related branches found
No related tags found
No related merge requests found
...@@ -38,9 +38,32 @@ resource 'Bookmarks' do ...@@ -38,9 +38,32 @@ resource 'Bookmarks' do
let(:type) { 'LearningObject' } let(:type) { 'LearningObject' }
let(:raw_post) { params.to_json } let(:raw_post) { params.to_json }
example_request 'Adding a bookmark' do example_request 'Adding a bookmark' do
expect(status).to eq(201) expect(status).to eq(201)
end end
end end
delete 'v1/users/:user_id/bookmarks/:bookmark_id' do
include_context "authenticate_user"
parameter :user_id, 'The user id'
parameter :bookmark_id, 'The id of the bookmark'
parameter :id, 'The id of the object', scope: :bookmarks
parameter :type, 'Represents the type of bookmark, [ LearningObject, Collection]', scope: :bookmarks
let(:user_id) { @user.id }
let(:bookmark_id) { @bookmark.id }
let(:id) { learning_objects.first.id }
let(:type) { 'LearningObject' }
let(:raw_post) { params.to_json }
before do
@bookmark = create(:bookmark, user: @user, bookmarkable: learning_objects.first )
end
example_request 'Removing a bookmark' do
expect(status).to eq(200)
end
end
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