Commit 3f79e19c72837788efaa92e0c7add2f11daff1ff
1 parent
65b9e90a
Exists in
master
and in
27 other branches
Update work_assignment to new author scheme
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
plugins/work_assignment/test/unit/work_assingment_plugin/work_assignment_test.rb
@@ -35,7 +35,7 @@ class WorkAssignmentTest < ActiveSupport::TestCase | @@ -35,7 +35,7 @@ class WorkAssignmentTest < ActiveSupport::TestCase | ||
35 | organization = fast_create(Organization) | 35 | organization = fast_create(Organization) |
36 | author = fast_create(Person) | 36 | author = fast_create(Person) |
37 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Sample Work Assignment', :profile => organization) | 37 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Sample Work Assignment', :profile => organization) |
38 | - submission = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => work_assignment, :last_changed_by => author) | 38 | + submission = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => work_assignment, :author => author) |
39 | 39 | ||
40 | author_folder = work_assignment.find_or_create_author_folder(author) | 40 | author_folder = work_assignment.find_or_create_author_folder(author) |
41 | assert author_folder, submission.parent | 41 | assert author_folder, submission.parent |
plugins/work_assignment/test/unit/work_assingment_plugin_test.rb
@@ -3,7 +3,7 @@ require 'test_helper' | @@ -3,7 +3,7 @@ require 'test_helper' | ||
3 | class WorkAssignmentPluginTest < ActiveSupport::TestCase | 3 | class WorkAssignmentPluginTest < ActiveSupport::TestCase |
4 | should 'verify if a content is a work_assignment submission' do | 4 | should 'verify if a content is a work_assignment submission' do |
5 | organization = fast_create(Organization) | 5 | organization = fast_create(Organization) |
6 | - content = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :last_changed_by => fast_create(Person)) | 6 | + content = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :author => fast_create(Person)) |
7 | assert !WorkAssignmentPlugin.is_submission?(content) | 7 | assert !WorkAssignmentPlugin.is_submission?(content) |
8 | 8 | ||
9 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) | 9 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) |
@@ -49,6 +49,6 @@ class WorkAssignmentPluginTest < ActiveSupport::TestCase | @@ -49,6 +49,6 @@ class WorkAssignmentPluginTest < ActiveSupport::TestCase | ||
49 | organization = fast_create(Organization) | 49 | organization = fast_create(Organization) |
50 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) | 50 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) |
51 | author_folder = work_assignment.find_or_create_author_folder(fast_create(Person)) | 51 | author_folder = work_assignment.find_or_create_author_folder(fast_create(Person)) |
52 | - UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => author_folder, :last_changed_by => author) | 52 | + UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :profile => organization, :parent => author_folder, :author => author, :last_changed_by => author) |
53 | end | 53 | end |
54 | end | 54 | end |