Skip to content

Commit

Permalink
update tests reflecting the previous two changes
Browse files Browse the repository at this point in the history
  • Loading branch information
larry0x committed Sep 19, 2022
1 parent ddc27a5 commit 42dc991
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions contracts/hub/tests/creating.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn creating_badge() {
vec![
attr("action", "badges/hub/create_badge"),
attr("id", "1"),
attr("fee", ""),
attr("fee", "[]"),
]
);

Expand Down Expand Up @@ -140,7 +140,7 @@ fn creating_badge() {
vec![
attr("action", "badges/hub/create_badge"),
attr("id", "2"),
attr("fee", ""),
attr("fee", "[]"),
]
);

Expand Down Expand Up @@ -186,7 +186,7 @@ fn editing_badge() {
vec![
attr("action", "badges/hub/edit_badge"),
attr("id", "1"),
attr("fee", ""),
attr("fee", "[]"),
],
);

Expand Down Expand Up @@ -281,7 +281,7 @@ fn adding_keys() {
vec![
attr("action", "badges/hub/add_keys"),
attr("id", "1"),
attr("fee", ""),
attr("fee", "[]"),
attr("keys_added", "2"),
],
);
Expand Down
11 changes: 9 additions & 2 deletions contracts/hub/tests/deployment.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_std::testing::{mock_dependencies};
use cosmwasm_std::{attr, Addr, Decimal};
use cosmwasm_std::{attr, Addr, Decimal, SubMsg, WasmMsg, to_binary};

use badge_hub::error::ContractError;
use badge_hub::state::{BADGE_COUNT, NFT, DEVELOPER};
Expand Down Expand Up @@ -51,7 +51,14 @@ fn setting_nft() {
// developer sets nft
{
let res = execute::set_nft(deps.as_mut(), Addr::unchecked("larry"), "nft").unwrap();
assert_eq!(res.messages, vec![]);
assert_eq!(
res.messages,
vec![SubMsg::new(WasmMsg::Execute {
contract_addr: "nft".to_string(),
msg: to_binary(&badges::nft::ExecuteMsg::_Ready {}).unwrap(),
funds: vec![]
})],
);
assert_eq!(
res.attributes,
vec![
Expand Down

0 comments on commit 42dc991

Please sign in to comment.