mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
391d2f5241
* Add Canvas node as Parachain template * Remove `pallet-contracts` * Point to local Cumulus dependency * Use double quotes instead of single quotes * Get rid of GPL licensing * Remove references to Canvas * Get rid of warnings * Remove GLP-3 License copy-pasta file * Copy in README from `substrate-parachain-template` * Add mention of `polkadot-launch` tool * Add missing screenshot asset * Remove Canvas hidden files and scripts * Rename `template` to `parachain-template` * Remove a few more Canvas references * Add `pallet-template` * Get `pallet-template` compiling * Remove TODOs about Weights * Sort some dependencies * Remove contracts specific const * Change binary name back to `parachain-collator` * RustFmt * Fix mock tests * Purge sneaky whitespace * Add template pallet index to runtime Co-authored-by: Ricardo Rius <9488369+riusricardo@users.noreply.github.com> * Add force authoring to collator `polkadot-launch` config Co-authored-by: Ricardo Rius <9488369+riusricardo@users.noreply.github.com> * Refer README readers to `substrate-parachain-template` * Remove license header in `build.rs` Co-authored-by: Michael Müller <michi@parity.io> * Fix punctuation nitpick Co-authored-by: Michael Müller <michi@parity.io> * Remove unused `lib.rs` file * Add note about Rococo network Co-authored-by: Ricardo Rius <9488369+riusricardo@users.noreply.github.com> Co-authored-by: Michael Müller <michi@parity.io>
21 lines
611 B
Rust
21 lines
611 B
Rust
use crate::{mock::*, Error};
|
|
use frame_support::{assert_noop, assert_ok};
|
|
|
|
#[test]
|
|
fn it_works_for_default_value() {
|
|
new_test_ext().execute_with(|| {
|
|
// Dispatch a signed extrinsic.
|
|
assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));
|
|
// Read pallet storage and assert an expected result.
|
|
assert_eq!(TemplateModule::something(), Some(42));
|
|
});
|
|
}
|
|
|
|
#[test]
|
|
fn correct_error_for_none_value() {
|
|
new_test_ext().execute_with(|| {
|
|
// Ensure the expected error is thrown when no value is present.
|
|
assert_noop!(TemplateModule::cause_error(Origin::signed(1)), Error::<Test>::NoneValue);
|
|
});
|
|
}
|