Skip to content

Commit 2dfd27f

Browse files
committed
docs: start outlining test plan per contract
1 parent 4919f97 commit 2dfd27f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/smart-contract-test-plan.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# aibtc smart contract test plan
2+
3+
All tests will be created with and executed using the Clarinet JS SDK.
4+
5+
## Base DAO
6+
7+
set-extension() fails if caller is not DAO or extension
8+
set-extensions() fails if caller is not DAO or extension
9+
execute() fails if caller is not DAO or extension
10+
construct() fails when called by an account that is not the deployer
11+
construct() fails when initializing the DAO with bootstrap proposal a second time
12+
construct() succeeds when initializing the DAO with bootstrap proposal
13+
request-extension-callback() fails if caller is not an extension
14+
request-extension-callback() succeeds and calls an extension
15+
16+
is-extension() succeeds and returns false with unrecognized extension
17+
is-extension() succeeds and returns true for active extensions
18+
executed-at() succeeds and returns none with unrecognized proposal
19+
executed-at() succeeds and returns the Bitcoin block height the proposal was executed
20+
21+
## Extensions
22+
23+
### consensus
24+
25+
execute() fails if proposal has already been executed via vote execute
26+
27+
### Bank Account
28+
29+
set-account-holder() fails if caller is not DAO or extension
30+
set-account-holder() succeeds and sets the account holder to a standard principal
31+
set-account-holder() succeeds and sets the account holder to a contract principal
32+
33+
set-withdrawal-period() fails if caller is not DAO or extension
34+
set-withdrawal-period() fails if value is set to 0
35+
set-withdrawal-period() succeeds and sets the withdrawal period
36+
37+
set-withdrawal-amount() fails if caller is not DAO or extension
38+
set-withdrawal-amount() fails if value is set to 0
39+
set-withdrawal-amount() succeeds and sets the withdrawal amount
40+
41+
override-last-withdrawal-block() fails if caller is not DAO or extension
42+
override-last-withdrawal-block() fails if value is set to 0
43+
override-last-withdrawal-block() fails if value is set less than deployed height
44+
override-last-withdrawal-block() succeeds and sets the withdrawal block
45+
46+
get-account-terms() succeeds and returns expected values
47+
48+
## Proposals

0 commit comments

Comments
 (0)