Sha256: 741f823e8e4020598ef1030c6563257d807a98a4bd8ff536b913a0d738e12189
Contents?: true
Size: 706 Bytes
Versions: 5
Compression:
Stored size: 706 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.pid, @receiver.user_key).run end after do @file.destroy 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
5 entries across 5 versions & 1 rubygems