diff --git a/spec/acceptance/learning_objects_spec.rb b/spec/acceptance/learning_objects_spec.rb index 95676ce2178130d11f943ec2a7ff906bc2f16241..ccd9aff682848bef1396379136291cdd8e8359d9 100644 --- a/spec/acceptance/learning_objects_spec.rb +++ b/spec/acceptance/learning_objects_spec.rb @@ -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"