diff --git a/spec/acceptance/bookmarks_spec.rb b/spec/acceptance/bookmarks_spec.rb index 1a359e2422ac534a9398b28b8a31178d362b2169..48242aa7da08c4a1180f23e5b58a96d7350aa29e 100644 --- a/spec/acceptance/bookmarks_spec.rb +++ b/spec/acceptance/bookmarks_spec.rb @@ -38,9 +38,32 @@ resource 'Bookmarks' do let(:type) { 'LearningObject' } let(:raw_post) { params.to_json } - example_request 'Adding a bookmark' do + example_request 'Adding a bookmark' do expect(status).to eq(201) 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