spec/binary_spec.rb in lifen_fhir-0.4.1 vs spec/binary_spec.rb in lifen_fhir-0.4.2
- old
+ new
@@ -1,29 +1,29 @@
require 'spec_helper'
describe LifenFhir::Binary do
- describe ':download with right uuid' do
+ describe ':download' do
let(:binary) { LifenFhir::Binary.new(uuid: "valid_binary_id") }
it 'works' do
-
VCR.use_cassette "binary/download/valid" do
expect(Digest::MD5.hexdigest(binary.download)).to eq("2285abb032c5e9054a518690b4701ab6")
end
end
- end
- describe ':download with right uuid' do
+ context 'with invalid uuid' do
- let(:binary) { LifenFhir::Binary.new(uuid: "wrong-binary-uuid") }
+ let(:binary) { LifenFhir::Binary.new(uuid: "wrong-binary-uuid") }
- it 'fails with wrong uuid' do
-
+ it 'fails nicely' do
VCR.use_cassette "binary/download/invalid" do
expect{ binary.download }.to raise_error LifenFhir::Error
end
end
end
+
end
+
+end