Commit 3f79e19c72837788efaa92e0c7add2f11daff1ff
1 parent
65b9e90a
Exists in
master
and in
29 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 | 35 | organization = fast_create(Organization) |
36 | 36 | author = fast_create(Person) |
37 | 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 | 40 | author_folder = work_assignment.find_or_create_author_folder(author) |
41 | 41 | assert author_folder, submission.parent | ... | ... |
plugins/work_assignment/test/unit/work_assingment_plugin_test.rb
... | ... | @@ -3,7 +3,7 @@ require 'test_helper' |
3 | 3 | class WorkAssignmentPluginTest < ActiveSupport::TestCase |
4 | 4 | should 'verify if a content is a work_assignment submission' do |
5 | 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 | 7 | assert !WorkAssignmentPlugin.is_submission?(content) |
8 | 8 | |
9 | 9 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) |
... | ... | @@ -49,6 +49,6 @@ class WorkAssignmentPluginTest < ActiveSupport::TestCase |
49 | 49 | organization = fast_create(Organization) |
50 | 50 | work_assignment = WorkAssignmentPlugin::WorkAssignment.create!(:name => 'Work Assignment', :profile => organization) |
51 | 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 | 53 | end |
54 | 54 | end | ... | ... |