Skip to content

Commit c630c3d

Browse files
committed
Fix minimal schema-derive test
1 parent 03f2080 commit c630c3d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

packages/schema-derive/src/generate_api.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,25 @@ mod tests {
225225

226226
#[test]
227227
fn api_object_minimal() {
228+
assert_eq!(
229+
generate_api_impl(&parse_quote! {}),
230+
parse_quote! {
231+
::cosmwasm_schema::Api {
232+
contract_name: ::std::env!("CARGO_PKG_NAME").to_string(),
233+
contract_version: ::std::env!("CARGO_PKG_VERSION").to_string(),
234+
instantiate: None,
235+
execute: None,
236+
query: None,
237+
migrate: None,
238+
sudo: None,
239+
responses: None,
240+
}
241+
}
242+
);
243+
}
244+
245+
#[test]
246+
fn api_object_instantiate_only() {
228247
assert_eq!(
229248
generate_api_impl(&parse_quote! {
230249
instantiate: InstantiateMsg,
@@ -245,7 +264,7 @@ mod tests {
245264
}
246265

247266
#[test]
248-
fn api_object_name_vesion_override() {
267+
fn api_object_name_version_override() {
249268
assert_eq!(
250269
generate_api_impl(&parse_quote! {
251270
name: "foo",

0 commit comments

Comments
 (0)