Skip to content

Commit

Permalink
Add zero-delta test for limit_order_update op
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed May 10, 2023
1 parent ff48c7e commit df3421d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tests/operation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ BOOST_AUTO_TEST_CASE(limit_order_update_test)
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(asset(2), munee.amount(1))), fc::assert_exception);
// Cannot update order to expire in the past
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, {}, {}, db.head_block_time() - 10), fc::assert_exception);
// Cannot update order with a zero delta
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, {}, asset()), fc::assert_exception);
// Cannot update order to add more funds than seller has
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, {}, asset(501)), fc::assert_exception);
// Cannot update order to remove more funds than order has
Expand Down

0 comments on commit df3421d

Please sign in to comment.