Previously Pausable was tested by unit tests via near_sdk::testing_env, which mocks the chain.
The new integration tests compile the contract in near-plugins/tests/contracts/pausable, deploy it on chain via near workspaces and send transactions to it.
This is a step towards having only one contract for the Pausable plugin which is used for tests and serves as documentation resp. example, as laid out in #48. In a follow up PR I’ll clean up duplicate example contracts.
Other changes: refactor near-plugins/tests/common
Removed superfluous types that complicated the code.
Generalized helper functions to be used in tests of multiple plugins. Prior only AccessControllable was tested via integration tests.
Previously
Pausable
was tested by unit tests vianear_sdk::testing_env
, which mocks the chain.The new integration tests compile the contract in
near-plugins/tests/contracts/pausable
, deploy it on chain via nearworkspaces
and send transactions to it.This is a step towards having only one contract for the
Pausable
plugin which is used for tests and serves as documentation resp. example, as laid out in #48. In a follow up PR I’ll clean up duplicate example contracts.Other changes: refactor
near-plugins/tests/common
AccessControllable
was tested via integration tests.