Skip to content

Commit

Permalink
enhances the assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
gangov committed Sep 11, 2024
1 parent 03e7601 commit 3980a6a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contracts/auctions/src/test/bids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ fn unpause_changes_status_and_second_attempt_fails_to_unpause() {
collection_addr: collections_client.address.clone(),
item_id: 1,
minimum_price: None,
buy_now_price: None,
buy_now_price: Some(10),
};

mp_client.create_auction(&item_info, &seller, &WEEKLY);
Expand All @@ -491,6 +491,16 @@ fn unpause_changes_status_and_second_attempt_fails_to_unpause() {
Err(Ok(ContractError::AuctionNotActive))
);

assert_eq!(
mp_client.try_buy_now(&1, &bidder),
Err(Ok(ContractError::AuctionNotActive))
);

assert_eq!(
mp_client.try_finalize_auction(&1),
Err(Ok(ContractError::AuctionNotActive))
);

mp_client.unpause(&1);
assert_eq!(mp_client.get_auction(&1).status, AuctionStatus::Active);

Expand Down

0 comments on commit 3980a6a

Please sign in to comment.