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

show submission and submit docs

parent 419cb034
No related branches found
No related tags found
No related merge requests found
......@@ -234,4 +234,36 @@ resource 'Learning Objects' do
end
end
get '/v1/learning_objects/:id/show_submission' do
include_context "authenticate_user_curator"
let(:id) { @learning_object.id }
before do
@learning_object = create(:learning_object)
@learning_object.update(state: LearningObject.states[:submitted])
end
example 'Show a submission' do
do_request
expect(status).to eq(200)
end
end
post '/v1/learning_objects/:id/submit' do
include_context "authenticate_user_submitter"
let(:id) { @learning_object.id }
before do
@learning_object = create(:learning_object, publisher: @user)
@learning_object.update(state: LearningObject.states[:draft])
end
example 'Submit a learning object to curator' 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