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