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

put in learning_object acceptance test

parent 9c792183
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ resource 'Learning Objects' do
parameter :language_id, 'The id of a language'
parameter :license_id, 'The id of a license'
#TODO: add items of array
let(:author) { Faker::Name.name }
let(:name) { Faker::Name.name }
let(:description) { Faker::Lorem.paragraph }
......@@ -72,6 +73,36 @@ resource 'Learning Objects' do
end
end
put '/v1/learning_objects/:id' do
include_context "authenticate_user"
parameter :author, 'The author of a educational content'
parameter :name, 'The name of the learning object'
parameter :description, 'The description of educational content of the learning object'
parameter :link, 'Object link, when don’t have any attachments'
parameter :software, 'If some software is needed to run the object'
parameter :tags, 'Array with tags (by name)'
parameter :subjects, 'Array with subjects ids'
parameter :educational_stages, 'Array with educational stages ids'
parameter :object_type_id, 'The id of object type'
parameter :language_id, 'The id of a language'
parameter :license_id, 'The id of a license'
#TODO: add items of array
let(:id) { @learning_object.id }
let(:description) { Faker::Lorem.paragraph }
let(:raw_post) { params.to_json }
before do
@learning_object = create(:learning_object, publisher: @user)
end
example 'Updating a learning_object draft' do
do_request
expect(status).to eq(200)
end
end
post '/v1/learning_objects/:id/like' do
include_context "authenticate_user"
......
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