Skip to content

Commit

Permalink
fix tests after auth
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgunozerk committed Jan 23, 2025
1 parent 6a9d59e commit 5df6450
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 1 deletion.
2 changes: 2 additions & 0 deletions contracts/token/fungible/src/extensions/burnable/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct MockContract;
#[test]
fn burn_works() {
let e = Env::default();
e.mock_all_auths();
let address = e.register(MockContract, ());
let account = Address::generate(&e);
e.as_contract(&address, || {
Expand Down Expand Up @@ -46,6 +47,7 @@ fn burn_with_allowance_works() {
#[should_panic(expected = "Error(Contract, #1)")]
fn burn_with_insufficient_balance_panics() {
let e = Env::default();
e.mock_all_auths();
let address = e.register(MockContract, ());
let account = Address::generate(&e);
e.as_contract(&address, || {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,39 @@
4095
]
],
[
{
"contract_data": {
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
"key": {
"ledger_key_nonce": {
"nonce": 801925984706572462
}
},
"durability": "temporary"
}
},
[
{
"last_modified_ledger_seq": 0,
"data": {
"contract_data": {
"ext": "v0",
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
"key": {
"ledger_key_nonce": {
"nonce": 801925984706572462
}
},
"durability": "temporary",
"val": "void"
}
},
"ext": "v0"
},
6311999
]
],
[
{
"contract_code": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@
},
"auth": [
[],
[]
[
[
"CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
{
"function": {
"contract_fn": {
"contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM",
"function_name": "",
"args": []
}
},
"sub_invocations": []
}
]
]
],
"ledger": {
"protocol_version": 22,
Expand Down Expand Up @@ -113,6 +127,39 @@
4095
]
],
[
{
"contract_data": {
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
"key": {
"ledger_key_nonce": {
"nonce": 801925984706572462
}
},
"durability": "temporary"
}
},
[
{
"last_modified_ledger_seq": 0,
"data": {
"contract_data": {
"ext": "v0",
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
"key": {
"ledger_key_nonce": {
"nonce": 801925984706572462
}
},
"durability": "temporary",
"val": "void"
}
},
"ext": "v0"
},
6311999
]
],
[
{
"contract_code": {
Expand Down

0 comments on commit 5df6450

Please sign in to comment.