test/test_schema.rb in avro-1.7.7 vs test/test_schema.rb in avro-1.8.0
- old
+ new
@@ -129,6 +129,18 @@
}},
{'name' => 'reference', 'type' => 'my.name.space.InnerFixed'}
]
}
end
+
+ def test_unknown_named_type
+ error = assert_raise Avro::UnknownSchemaError do
+ Avro::Schema.parse <<-SCHEMA
+ {"type": "record", "name": "my.name.space.Record", "fields": [
+ {"name": "reference", "type": "MissingType"}
+ ]}
+ SCHEMA
+ end
+
+ assert_equal '"MissingType" is not a schema we know about.', error.message
+ end
end