From 3f79e19c72837788efaa92e0c7add2f11daff1ff Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 24 Jul 2014 14:18:24 +0000 Subject: [PATCH] Update work_assignment to new author scheme --- plugins/work_assignment/test/unit/work_assingment_plugin/work_assignment_test.rb | 2 +- plugins/work_assignment/test/unit/work_assingment_plugin_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/work_assignment/test/unit/work_assingment_plugin/work_assignment_test.rb b/plugins/work_assignment/test/unit/work_assingment_plugin/work_assignment_test.rb index 06a077d..73b9e67 100644 --- a/plugins/work_assignment/test/unit/work_assingment_plugin/work_assignment_test.rb +++ b/plugins/work_assignment/test/unit/work_assingment_plugin/work_assignment_test.rb @@ -35,7 +35,7 @@ class WorkAssignmentTest < ActiveSupport::TestCase organization = fast_create(Organization) author = fast_create(Person) work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Sample Work Assignment', :profile => organization) - submission = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => work_assignment, :last_changed_by => author) + submission = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => work_assignment, :author => author) author_folder = work_assignment.find_or_create_author_folder(author) assert author_folder, submission.parent diff --git a/plugins/work_assignment/test/unit/work_assingment_plugin_test.rb b/plugins/work_assignment/test/unit/work_assingment_plugin_test.rb index fd15061..cfcd2fa 100644 --- a/plugins/work_assignment/test/unit/work_assingment_plugin_test.rb +++ b/plugins/work_assignment/test/unit/work_assingment_plugin_test.rb @@ -3,7 +3,7 @@ require 'test_helper' class WorkAssignmentPluginTest < ActiveSupport::TestCase should 'verify if a content is a work_assignment submission' do organization = fast_create(Organization) - content = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :last_changed_by => fast_create(Person)) + content = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :author => fast_create(Person)) assert !WorkAssignmentPlugin.is_submission?(content) work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) @@ -49,6 +49,6 @@ class WorkAssignmentPluginTest < ActiveSupport::TestCase organization = fast_create(Organization) work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) author_folder = work_assignment.find_or_create_author_folder(fast_create(Person)) - UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => author_folder, :last_changed_by => author) + UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => author_folder, :author => author, :last_changed_by => author) end end -- libgit2 0.21.2