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

Fix some tests that now require to be logged in as admin

parent 574f4b93
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ resource 'Educational Stages' do
end
delete '/v1/:type/:id/educational_stages' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :id, 'The id of object'
parameter :type, 'Represents the type of object, [learning_objects, collection]'
......
......@@ -36,7 +36,7 @@ resource 'Institutions' do
end
post '/v1/institutions' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :name, 'The name of the institution'
parameter :description, 'The description of the institution'
......@@ -58,7 +58,7 @@ resource 'Institutions' do
end
put '/v1/institutions/:id' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :id, 'The id of the institution'
parameter :name, 'The name of the institution'
......@@ -82,7 +82,7 @@ resource 'Institutions' do
end
delete '/v1/institutions/:id' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :id, 'The id of the institution'
......
......@@ -26,7 +26,7 @@ resource 'Mime Types' do
post '/v1/mime_types' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :extension, 'The name of the mime_type', scope: :mime_type
parameter :mime_type, 'The mime_type', scope: :mime_type
......@@ -42,7 +42,7 @@ resource 'Mime Types' do
end
put '/v1/mime_types/:id' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :extension, 'The name of the mime_type', scope: :mime_type
parameter :mime_type, 'The mime_type', scope: :mime_type
......@@ -58,7 +58,7 @@ resource 'Mime Types' do
end
delete '/v1/mime_types/:id' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
let(:id) { mime_types.first.id }
......
......@@ -31,7 +31,7 @@ resource 'Object Type' do
end
post '/v1/object_types' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :name, 'The name of the object type', scope: :object_type
parameter :mime_types, 'Array of mime_types', scope: :object_type
......@@ -48,7 +48,7 @@ resource 'Object Type' do
delete 'v1/object_types/:id' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :id, "The id of the object_type"
......@@ -61,7 +61,7 @@ resource 'Object Type' do
end
put '/v1/object_types/:id' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :id, "The id of the object_type"
parameter :name, 'The name of the object type', scope: :object_type
......
......@@ -42,7 +42,7 @@ resource 'Subjects' do
end
delete 'v1/:type/:id/subjects' do
include_context "authenticate_user"
include_context "authenticate_user_admin"
parameter :id, "The id of the object"
parameter :type, "Represents the type of the object [LearningObject, Collection]"
......
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