expect(Raven).toreceive(:capture_message).with("Upload file does not exist",extra: upload.attributes)
upload.exist?
end
it'increments a metric counter to signal a problem'do
upload=create(:upload,:issuable_upload)
counter=double(:counter)
expect(counter).toreceive(:increment)
expect(Gitlab::Metrics).toreceive(:counter).with(:upload_file_does_not_exist_total,'The number of times an upload record could not find its file').and_return(counter)