diff --git a/spec/acceptance/activities_spec.rb b/spec/acceptance/activities_spec.rb index 4a98cc34416c766ace4d2fe04d9968c2a635840c..cb9193f80a09a2118c2620718ff2ed5795c8585b 100644 --- a/spec/acceptance/activities_spec.rb +++ b/spec/acceptance/activities_spec.rb @@ -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 diff --git a/spec/acceptance/bookmarks_spec.rb b/spec/acceptance/bookmarks_spec.rb index 48242aa7da08c4a1180f23e5b58a96d7350aa29e..dec741614d0dd06868354c2e1a82cee086a1bbf9 100644 --- a/spec/acceptance/bookmarks_spec.rb +++ b/spec/acceptance/bookmarks_spec.rb @@ -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 } diff --git a/spec/acceptance/collections_spec.rb b/spec/acceptance/collections_spec.rb index 796d0ee4b305946c7d413b9d1f4f2a0706d70751..f53cf13d6db6d57abce0b1254f32435dee8c7b4c 100644 --- a/spec/acceptance/collections_spec.rb +++ b/spec/acceptance/collections_spec.rb @@ -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 } diff --git a/spec/acceptance/complaints_spec.rb b/spec/acceptance/complaints_spec.rb index a2bf9d34bef1ef5ec0882ffc854876688680b761..c3a1d9c5003ef2702fbcb1efef452925cd095ebe 100644 --- a/spec/acceptance/complaints_spec.rb +++ b/spec/acceptance/complaints_spec.rb @@ -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) diff --git a/spec/acceptance/contacts_spec.rb b/spec/acceptance/contacts_spec.rb index f4d3d737f6dc222c3cde21864f037c0b58abc55c..dfbe7b4c1c5f34ed6318b7881c945b92def270db 100644 --- a/spec/acceptance/contacts_spec.rb +++ b/spec/acceptance/contacts_spec.rb @@ -2,6 +2,8 @@ require 'acceptance_helpers' resource 'Contacts' do + explanation "Are the contact forms of the API." + before { 12.times { create(:contact) } } let(:contacts) { Contact.all } diff --git a/spec/acceptance/educational_stages_spec.rb b/spec/acceptance/educational_stages_spec.rb index 3f6aa502310f30a9ebad43b3ccdc2824d1623ff5..b7d7f85d952ffecc4cb5530d310fe1ea51483003 100644 --- a/spec/acceptance/educational_stages_spec.rb +++ b/spec/acceptance/educational_stages_spec.rb @@ -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 } diff --git a/spec/acceptance/follows_spec.rb b/spec/acceptance/follows_spec.rb index 9619f306a34e46fb92101444a895487167086dea..640b6fcee2087419890384809366bbcab33ac3de 100644 --- a/spec/acceptance/follows_spec.rb +++ b/spec/acceptance/follows_spec.rb @@ -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 } diff --git a/spec/acceptance/institutions_spec.rb b/spec/acceptance/institutions_spec.rb index f41b43559c2b1e1b31e3911529670a78e28b9bb2..986f63691fc725f4cef0669b35d40f50a95bbf6c 100644 --- a/spec/acceptance/institutions_spec.rb +++ b/spec/acceptance/institutions_spec.rb @@ -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 } diff --git a/spec/acceptance/languages_spec.rb b/spec/acceptance/languages_spec.rb index b0112d597e9811c1ff5d54a0882b9f8995e129f3..e1a836b241b210f16d25aebe3b5f335f0892c52e 100644 --- a/spec/acceptance/languages_spec.rb +++ b/spec/acceptance/languages_spec.rb @@ -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 diff --git a/spec/acceptance/learning_objects_spec.rb b/spec/acceptance/learning_objects_spec.rb index 06e8f90b35e9f2023bb9f3963d1f9c28373dd190..02bbc1c7182425cb2a8d3e53b4fc7bfdc6edd573 100644 --- a/spec/acceptance/learning_objects_spec.rb +++ b/spec/acceptance/learning_objects_spec.rb @@ -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 } diff --git a/spec/acceptance/mime_types_spec.rb b/spec/acceptance/mime_types_spec.rb index 5ded524aae0be3eaedcf7e584dd43181cc62f70a..8be6e3c42d543a96c303ee314e7ece0b9f08fa61 100644 --- a/spec/acceptance/mime_types_spec.rb +++ b/spec/acceptance/mime_types_spec.rb @@ -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 } diff --git a/spec/acceptance/object_types_spec.rb b/spec/acceptance/object_types_spec.rb index 684092f73c08d14c64059a4a53c83b3439d1d92a..862bc56352f79998caf2e95e7ed53993ebdf2058 100644 --- a/spec/acceptance/object_types_spec.rb +++ b/spec/acceptance/object_types_spec.rb @@ -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 } diff --git a/spec/acceptance/reviews_spec.rb b/spec/acceptance/reviews_spec.rb index a884496c36dd7b26f1f7be0b2a0392daefb2c35d..cc53d363d48f6ae360fab49db3c1d07ec8314d56 100644 --- a/spec/acceptance/reviews_spec.rb +++ b/spec/acceptance/reviews_spec.rb @@ -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 } diff --git a/spec/acceptance/searches_spec.rb b/spec/acceptance/searches_spec.rb index 180baa8acd7428d378aff851b70ca43a6a901030..08d7a25020fc14693643e86571608449b1554928 100644 --- a/spec/acceptance/searches_spec.rb +++ b/spec/acceptance/searches_spec.rb @@ -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 diff --git a/spec/acceptance/statistics_spec.rb b/spec/acceptance/statistics_spec.rb index a5037291646dd11a0bc43eb5a83cf79fcc7f8cc0..bc1ece8e14d239574ec80a41224071cd666c0f4e 100644 --- a/spec/acceptance/statistics_spec.rb +++ b/spec/acceptance/statistics_spec.rb @@ -4,6 +4,9 @@ require 'shared/contexts' resource 'Statistics' do before { 12.times { create(:learning_object) } } + 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)" + let(:learning_objects) { LearningObject.all } get '/v1/statistics' do diff --git a/spec/acceptance/subjects_spec.rb b/spec/acceptance/subjects_spec.rb index 4c4a3523aee17ac85dbcaf3d3ea7b6ebd18b25b9..4c118babd3f1496ebf408c65edabeb8d6cad7384 100644 --- a/spec/acceptance/subjects_spec.rb +++ b/spec/acceptance/subjects_spec.rb @@ -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 } diff --git a/spec/acceptance/suggestions_spec.rb b/spec/acceptance/suggestions_spec.rb index 28c36fcde3aef5a8fb95464f71a6c58c86ce0ea1..9ed9a4493aaf3ec01ed08f5008b41aa6a5eeb7f3 100644 --- a/spec/acceptance/suggestions_spec.rb +++ b/spec/acceptance/suggestions_spec.rb @@ -2,6 +2,8 @@ require 'acceptance_helpers' resource 'Suggestions' do + explanation "Are the suggestion forms of the API." + before { 12.times { create(:suggestion) } } let(:suggestions) { Suggestion.all } diff --git a/spec/acceptance/tags_spec.rb b/spec/acceptance/tags_spec.rb index 7449f75aa2d31e42863126d4c9af2298f9b5feef..96948d83860c8e56b871f741367929771971d2ca 100644 --- a/spec/acceptance/tags_spec.rb +++ b/spec/acceptance/tags_spec.rb @@ -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 } diff --git a/spec/acceptance/users_spec.rb b/spec/acceptance/users_spec.rb index 60ff1d3a023460717858fe2690d4bd15f8306b00..ae60ec1687ac55b1ec9971f808d45bdea4d94dbe 100644 --- a/spec/acceptance/users_spec.rb +++ b/spec/acceptance/users_spec.rb @@ -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 } diff --git a/spec/factories/download.rb b/spec/factories/download.rb deleted file mode 100644 index f945fc96ee93d62021f59a2de3f63488922e7aa5..0000000000000000000000000000000000000000 --- a/spec/factories/download.rb +++ /dev/null @@ -1,7 +0,0 @@ -FactoryGirl.define do - factory :download do - downloadable - ip { Faker::Internet.ip_v4_address } - user - end -end