diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index 82482a7668..41f485008e 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -225,6 +225,25 @@ mod tests { #[test] fn api_object_minimal() { + assert_eq!( + generate_api_impl(&parse_quote! {}), + parse_quote! { + ::cosmwasm_schema::Api { + contract_name: ::std::env!("CARGO_PKG_NAME").to_string(), + contract_version: ::std::env!("CARGO_PKG_VERSION").to_string(), + instantiate: None, + execute: None, + query: None, + migrate: None, + sudo: None, + responses: None, + } + } + ); + } + + #[test] + fn api_object_instantiate_only() { assert_eq!( generate_api_impl(&parse_quote! { instantiate: InstantiateMsg, @@ -245,7 +264,7 @@ mod tests { } #[test] - fn api_object_name_vesion_override() { + fn api_object_name_version_override() { assert_eq!( generate_api_impl(&parse_quote! { name: "foo",