diff --git a/test/fixtures/languages.yml b/test/fixtures/languages.yml new file mode 100644 index 0000000000000000000000000000000000000000..bec61bf35849a5f56e0ac7ade121a0ead59a6507 --- /dev/null +++ b/test/fixtures/languages.yml @@ -0,0 +1,3 @@ +portuguese: + name: 'Português' + code: 'pt_BR' \ No newline at end of file diff --git a/test/fixtures/learning_objects.yml b/test/fixtures/learning_objects.yml index 369e22d2c81dc68d01dcf8543c97289c8488f67c..85cd38f40ce237fef7405c2937d7d09000ac544e 100644 --- a/test/fixtures/learning_objects.yml +++ b/test/fixtures/learning_objects.yml @@ -1,3 +1,15 @@ one: name: 'Object 1' description: 'Testing' + +user_lo: + name: 'Object 1' + description: 'Testing' + author: 'Mauricio' + publisher: john (User) + +institution_lo: + name: 'Institution Object 1' + description: 'Testing' + author: 'Mauricio' + publisher: ufpr (Institution) \ No newline at end of file diff --git a/test/fixtures/object_types.yml b/test/fixtures/object_types.yml new file mode 100644 index 0000000000000000000000000000000000000000..cbe376bcda66e759fcec840642174c19944d9b7f --- /dev/null +++ b/test/fixtures/object_types.yml @@ -0,0 +1,3 @@ +image: + name: 'Imagem' + mime_type: 'image/jpg' \ No newline at end of file diff --git a/test/models/learning_object_test.rb b/test/models/learning_object_test.rb index 5f2eb2802556654e295407602320c1adccc842ab..93858d3cbd08a5b81c17254b28a8329b4dbc7e3f 100644 --- a/test/models/learning_object_test.rb +++ b/test/models/learning_object_test.rb @@ -12,4 +12,21 @@ class LearningObjectTest < ActiveSupport::TestCase should belong_to :language should belong_to(:attachment).class_name('LearningObject::Attachment') should belong_to :object_type + + #sociable + should have_many :views + should have_many :downloads + should have_many :likes + should have_many :shares + include ::Portalmec::SociableTests + + protected + + def sociable_object + learning_objects(:user_lo) + end + + def sociable_user + users(:john) + end end