Skip to content

Instantly share code, notes, and snippets.

@AbbasHoseini
Last active December 10, 2021 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AbbasHoseini/87dd1579bfbec2b1b6ae36d150a2ca75 to your computer and use it in GitHub Desktop.
Save AbbasHoseini/87dd1579bfbec2b1b6ae36d150a2ca75 to your computer and use it in GitHub Desktop.
test('adding item increases total cost', () {
final cart = CartModel();
final startingPrice = cart.totalPrice;
cart.addListener(() {
expect(cart.totalPrice, greaterThan(startingPrice));
});
cart.add(Item('Dash'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment