This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed file size bug on work item restore requests
- Loading branch information
1 parent
331838e
commit e957237
Showing
2 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,6 +207,8 @@ def setup_item(subject) | |
before do | ||
test_obj = FactoryBot.create(:intellectual_object, identifier: 'abc/123') | ||
FactoryBot.create(:generic_file, identifier: 'abc/123/doc.pdf', intellectual_object_id: test_obj.id) | ||
FactoryBot.create(:generic_file, identifier: 'abc/123/txt.pdf', intellectual_object_id: test_obj.id) | ||
FactoryBot.create(:generic_file, identifier: 'abc/123/ppt.pdf', intellectual_object_id: test_obj.id) | ||
3.times do | ||
ingest_date = ingest_date + 1.days | ||
FactoryBot.create(:work_item, object_identifier: 'abc/123', | ||
|
@@ -224,6 +226,7 @@ def setup_item(subject) | |
end | ||
|
||
it 'should create a restoration request when asked' do | ||
test_obj = IntellectualObject.where(identifier: 'abc/123').first | ||
wi = WorkItem.create_restore_request('abc/123', '[email protected]') | ||
wi.work_item_state = FactoryBot.build(:work_item_state, work_item: wi) | ||
wi.action.should == Pharos::Application::PHAROS_ACTIONS['restore'] | ||
|
@@ -238,6 +241,7 @@ def setup_item(subject) | |
wi.pid.should == 0 | ||
wi.needs_admin_review.should == false | ||
wi.id.should_not be_nil | ||
wi.size.should == test_obj.gf_size | ||
end | ||
|
||
it 'should create a file restoration request when asked' do | ||
|
@@ -257,6 +261,7 @@ def setup_item(subject) | |
wi.needs_admin_review.should == false | ||
wi.id.should_not be_nil | ||
wi.generic_file_identifier.should == test_file.identifier | ||
wi.size.should == test_file.size | ||
end | ||
|
||
it 'should create a glacier restoration request when asked' do | ||
|