Skip to content
Snippets Groups Projects
Commit 63e9270f authored by Clarissa's avatar Clarissa
Browse files

#218: Copying old descriptions

parent 6738137e
No related branches found
No related tags found
No related merge requests found
Showing
with 38 additions and 1 deletion
......@@ -2,6 +2,8 @@ require 'acceptance_helpers'
require 'shared/contexts'
resource 'Activities' do
explanation "Users can see the activities of his followed collections and users."
before { 12.times { create(:learning_object); create(:user) } }
......@@ -38,12 +40,13 @@ resource 'Activities' do
include_context "authenticate_user"
let(:id) { users.first.id }
before do
create(:follow, followable: users.first, user: @user)
end
example 'Showing activities from a specific user' do
explanation "This method shows all activities from the logged user."
do_request
expect(status).to eq(200)
end
......
......@@ -5,6 +5,9 @@ resource 'Bookmarks' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Bookmark is a relation between user and object called ‘Favoritos’,
which are educational contents or collections. Bookmarks do not have an index for itens."
before { 12.times { create(:learning_object) } }
let(:bookmarks) { Bookmark.all }
......
......@@ -6,6 +6,8 @@ resource 'Collections' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Collection is a group of educational content or another collection, which an user can show, create, update and destroy."
before { 12.times { create(:collection, privacy: 'public' ); create(:learning_object) } }
let(:collections) { Collection.all }
......
......@@ -4,6 +4,8 @@ resource 'Complaints' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "With complaint an user may report a learning object or collection with inappropriate content."
before {
12.times {
create(:complaint)
......
......@@ -4,6 +4,8 @@ resource 'Educational Stages' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Educational stages to digital resources, like Ensino Médio, Ensino Fundamental."
before { 12.times { create(:educational_stage); create(:learning_object) } }
let(:educationalstages) { EducationalStage.all }
......
......@@ -3,6 +3,8 @@ require 'shared/contexts'
resource 'Follows' do
explanation "An User can follow a Collection or another User to see their Activities."
before { 12.times { create(:user) } }
let(:users) { User.all }
......
......@@ -4,6 +4,8 @@ resource 'Institutions' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Institutions can be schools, universities, or any other institution."
before { 12.times { create(:institution) } }
let(:institutions) { Institution.all }
......
......@@ -4,6 +4,8 @@ resource 'Languages' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Languages are a set of languages which the learning objects can belong to, like portuguese, english and etc."
let(:languages) { Language.all }
get '/v1/languages' do
......
......@@ -3,6 +3,8 @@ require 'shared/contexts'
resource 'Learning Objects' do
explanation "Learning objects are educational contents (movie, odf, file, sound, etc) which an user can show, create, update and destroy."
before { 12.times { create(:learning_object) } }
let(:learning_objects) { LearningObject.all }
......
......@@ -2,6 +2,8 @@ require 'acceptance_helpers'
resource 'Mime Types' do
explanation "Mime Types are the types/extentions which an Object Type can have."
before { 12.times { create(:mime_type) } }
let(:mime_types) { MimeType.all }
......
......@@ -4,6 +4,8 @@ resource 'Object Type' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Object Types are the types of the objects."
before { 12.times { create(:mime_type) } }
let(:object_types) { ObjectType.all }
......
......@@ -5,6 +5,8 @@ resource 'Reviews' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Review is a note for educational content or collections, made by users."
before { 12.times { create(:learning_object) } }
let(:learning_objects) { LearningObject.all }
......
......@@ -2,6 +2,8 @@ require 'acceptance_helpers'
resource 'Searches' do
explanation "Search is a query for Learning Objects, Collections or Users."
before { 12.times { create(:learning_object); LearningObject.reindex } }
get '/v1/search' do
......
......@@ -3,6 +3,9 @@ require 'shared/contexts'
resource 'Statistics' do
explanation "Statistics about the system usage (total number of published learning objects,
number of learning objects published in a month and number of learning objects downloaded in a month)"
before { 12.times { create(:learning_object); create(:user) } }
get '/v1/statistics' do
......
......@@ -4,6 +4,8 @@ resource 'Subjects' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "Subjects to digital resources, like Artes, Biologia."
before { 12.times { create(:subject); create(:learning_object) } }
let(:subject) { Subject.all }
......
......@@ -2,6 +2,8 @@ require 'acceptance_helpers'
resource 'Tags' do
explanation "Tags to digital resources of free and personal assignment."
before { 12.times { create(:learning_object) } }
let(:learning_objects) { LearningObject.all }
......
......@@ -4,6 +4,8 @@ resource 'Users' do
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
explanation "User represents the teacher and students in the system."
before { 12.times { create(:user) } }
let(:users) { User.all }
......
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