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

add destroy attachment test

parent dcf35175
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,22 @@ resource 'Learning Objects' do
end
end
delete '/v1/learning_objects/:learning_object_id/attachment/:attachment_id' do
include_context "authenticate_user"
let(:learning_object_id) { @learning_object.id }
let(:attachment_id) { @learning_object.attachments.first.id }
before do
@learning_object = create(:learning_object, publisher: @user)
@learning_object.attachments << LearningObject::Attachment.create
end
example 'Destroy an attachment (file) of a learning object' do
do_request
expect(status).to eq(200)
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