Sha256: 6d3755af7dd539e85aa64b8f0204c6b17ded6527c589d5ada19e31ac4005d62c
Contents?: true
Size: 870 Bytes
Versions: 8
Compression:
Stored size: 870 Bytes
Contents
describe Sufia::AuditFailureService do let!(:depositor) { create(:user) } let!(:log_date) { '2015-07-15 03:06:59' } let(:inbox) { depositor.mailbox.inbox } let(:file) do FileSet.create do |file| file.apply_depositor_metadata(depositor) end end before do allow(file).to receive(:log_date).and_return('2015-07-15 03:06:59') allow(file).to receive(:title).and_return('World Icon') allow(file).to receive(:original_file).and_return(double(uri: "http://localhost:8983/fedora/rest/test/nv/93/5x/32/nv935x32f/files/e5b91275-aab7-4720-88d4-c153d7196c23")) end describe "#call" do subject { described_class.new(file, depositor, log_date) } it "sends failing mail" do subject.call expect(inbox.count).to eq(1) inbox.each { |msg| expect(msg.last_message.subject).to eq('Failing Audit Run') } end end end
Version data entries
8 entries across 8 versions & 1 rubygems