spec/messaging_spec.rb in avro_turf-1.9.0 vs spec/messaging_spec.rb in avro_turf-1.10.0
- old
+ new
@@ -107,19 +107,19 @@
registry.register('person', schema)
registry.register('people', schema)
end
it 'encodes and decodes messages' do
- data = avro.encode(message, schema_id: 1)
+ data = avro.encode(message, schema_id: 0)
expect(avro.decode(data)).to eq message
end
it 'raises AvroTurf::SchemaNotFoundError when the schema does not exist on registry' do
expect { avro.encode(message, schema_id: 5) }.to raise_error(AvroTurf::SchemaNotFoundError)
end
it 'caches parsed schemas for decoding' do
- data = avro.encode(message, schema_id: 1)
+ data = avro.encode(message, schema_id: 0)
avro.decode(data)
allow(Avro::Schema).to receive(:parse).and_call_original
expect(avro.decode(data)).to eq message
expect(Avro::Schema).not_to have_received(:parse)
end
\ No newline at end of file