Sha256: 77e72f1872807445752071e415fbc273707caca14534bedf0c0bd537af662e05

Contents?: true

Size: 671 Bytes

Versions: 8

Compression:

Stored size: 671 Bytes

Contents

require 'spec_helper'

describe ContentDepositorChangeEventJob do
  before do
    @depositor = FactoryGirl.find_or_create(:jill)
    @receiver = FactoryGirl.find_or_create(:archivist)
    @file = ::GenericFile.new.tap do |gf|
      gf.apply_depositor_metadata(@depositor.user_key)
      gf.save!
    end
    ContentDepositorChangeEventJob.new(@file.id, @receiver.user_key).run
  end

  it "changes the depositor and records an original depositor" do
    @file.reload
    expect(@file.depositor).to eq @receiver.user_key
    expect(@file.proxy_depositor).to eq @depositor.user_key
    expect(@file.edit_users).to include(@receiver.user_key, @depositor.user_key)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-6.2.0 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.1.0 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.0.0 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.0.0.rc4 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.0.0.rc3 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.0.0.rc2 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.0.0.rc1 spec/jobs/content_depositor_change_event_job_spec.rb
sufia-6.0.0.beta1 spec/jobs/content_depositor_change_event_job_spec.rb