Skip to content

Commit

Permalink
Fix minimal schema-derive test
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Nov 10, 2023
1 parent 0c20c62 commit 73039ed
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion packages/schema-derive/src/generate_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand Down

0 comments on commit 73039ed

Please sign in to comment.