-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "hello-tacos.mligo" | ||
|
||
let available_tacos = 100 | ||
|
||
let test_available_tacos = | ||
let (taddr, _, _) = Test.originate main initial_storage 100tez in | ||
assert (Test.get_storage taddr = available_tacos) | ||
|
||
let test_buy_tacos = | ||
let (taddr, _, _) = Test.originate main initial_storage 100tez in | ||
let contr = Test.to_contract taddr in | ||
let _ = Test.transfer_to_contract_exn contr 1mutez in | ||
assert (Test.get_storage taddr = test_available_tacos - 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "hello-tacos.mligo" | ||
|
||
let available_tacos = 100n | ||
|
||
let test_available_tacos = | ||
let (taddr, _, _) = Test.originate main available_tacos 100tez in | ||
assert (Test.get_storage taddr = available_tacos) | ||
|
||
let test_buy_tacos = | ||
let (taddr, _, _) = Test.originate main available_tacos 100tez in | ||
let contr = Test.to_contract taddr in | ||
let _ = Test.transfer_to_contract_exn contr 1n in | ||
assert (Test.get_storage taddr = 100n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters