Skip to content

Commit

Permalink
Changing version revision to use the correct signature for Characteri…
Browse files Browse the repository at this point in the history
…zationJob
  • Loading branch information
carolyncole committed Aug 24, 2016
1 parent 8abbcf8 commit c4a82bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions app/actors/curation_concerns/actors/file_actor.rb
Expand Up @@ -34,9 +34,8 @@ def revert_to(revision_id)

CurationConcerns::VersioningService.create(repository_file, user)

# Retrieve a copy of the original file from the repository
working_file = WorkingDirectory.copy_repository_resource_to_working_directory(repository_file, file_set.id)
CharacterizeJob.perform_later(file_set, working_file)
# Characterize the original file from the repository
CharacterizeJob.perform_later(file_set, repository_file.id)
true
end
end
Expand Down
3 changes: 1 addition & 2 deletions spec/actors/curation_concerns/file_actor_spec.rb
Expand Up @@ -30,8 +30,7 @@

it 'reverts to a previous version of a file' do
expect(CurationConcerns::VersioningService).to receive(:create).with(previous_version, user)
expect(CurationConcerns::WorkingDirectory).to receive(:copy_repository_resource_to_working_directory).with(previous_version, file_set.id).and_return(file_path)
expect(CharacterizeJob).to receive(:perform_later).with(file_set, file_path)
expect(CharacterizeJob).to receive(:perform_later).with(file_set, previous_version.id)
actor.revert_to(revision_id)
end
end
Expand Down

0 comments on commit c4a82bd

Please sign in to comment.