web3wagers / gostarkme

Fund raising project in Starknet ecosystem
http://web3wagers.github.io/gostarkme/
GNU Affero General Public License v3.0
18 stars 74 forks source link

Feat: add tests for the new set_reason behaviour implemented in #253 #269

Closed ncoquelet closed 4 days ago

ncoquelet commented 4 days ago

Pull Request

Changes description

Current output

❯ snforge test
   Compiling gostarkme v0.1.0 (/home/nicolas/dev/contrib/web3/onlydust/od10/gostarkme/contracts/Scarb.toml)
    Finished release target(s) in 5 seconds

Collected 35 test(s) from gostarkme package
Running 0 test(s) from src/
Running 35 test(s) from tests/
[PASS] tests::test_donator::test_get_owner (gas: ~296)
[PASS] tests::test_donator_manager::test_constructor (gas: ~527)
[PASS] tests::test_donator::test_get_level (gas: ~296)
[PASS] tests::test_donator::test_update_donator_values (gas: ~384)
[PASS] tests::test_fund::test_set_reason_unauthorized (gas: ~1653)
[PASS] tests::test_fund::test_set_contact_handle_wrong_owner_or_admin (gas: ~1655)
[PASS] tests::test_fund_manager::test_new_fund_bad_goal (gas: ~1948)
[PASS] tests::test_fund_manager::test_constructor (gas: ~1948)
[PASS] tests::test_donator_manager::test_new_donator (gas: ~885)
[PASS] tests::test_fund::test_set_contact_handle_admin_2 (gas: ~1666)
[PASS] tests::test_fund::test_set_name_admin (gas: ~1670)
[PASS] tests::test_fund::test_set_reason_owner (gas: ~1666)
[PASS] tests::test_donator_manager::test_emit_event_donator_contract_deployed (gas: ~886)
[PASS] tests::test_fund::test_new_vote_received_event_emitted_successful (gas: ~1786)
[PASS] tests::test_fund_manager::test_new_fund (gas: ~3666)
[PASS] tests::test_donator::test_get_max_stark_donations_to_next_level (gas: ~296)
[PASS] tests::test_fund::test_set_name_not_admin_or_owner (gas: ~1659)
[PASS] tests::test_fund::test_set_reason_admins (gas: ~1677)
[PASS] tests::test_donator::test_get_total_stark_donations (gas: ~296)
[PASS] tests::test_fund::test_receive_vote_successful (gas: ~1787)
[PASS] tests::test_fund::test_set_goal_unauthorized (gas: ~1652)
[PASS] tests::test_fund::test_set_contact_handle_admin_1 (gas: ~1666)
[PASS] tests::test_fund::test_withdraw_with_wrong_owner (gas: ~1654)
[PASS] tests::test_fund::test_set_name_owner (gas: ~1662)
[PASS] tests::test_fund::test_set_contact_handle_owner (gas: ~1666)
[PASS] tests::test_fund::test_set_goal (gas: ~1665)
[PASS] tests::test_fund::test_set_evidence_link_wrong_owner (gas: ~1654)
[PASS] tests::test_fund::test_set_evidence_link (gas: ~1666)
[PASS] tests::test_fund_manager::test_fund_deployed_event (gas: ~3668)
[PASS] tests::test_fund::test_withdraw_with_non_closed_state (gas: ~1658)
[PASS] tests::test_fund::test_receive_vote_unsuccessful_double_vote (gas: ~1790)
[PASS] tests::test_fund::test_emit_event_donation_withdraw (gas: ~2131)
[PASS] tests::test_fund::test_update_received_donation (gas: ~1891)
[PASS] tests::test_fund::test_withdraw (gas: ~2146)
[PASS] tests::test_fund::test_constructor (gas: ~1675)
Tests: 35 passed, 0 failed, 0 skipped, 0 ignored, 0 filtered out

Time spent breakdown

1h

Comments

Thank you for your trust Available, I you need more involvement in your project