mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
removed pallet::getter from example pallets (#3371)
part of #3326 @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <mmuraca247@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,6 @@ pub mod pallet {
|
||||
// The pallet's runtime storage items.
|
||||
// https://docs.substrate.io/v3/runtime/storage
|
||||
#[pallet::storage]
|
||||
#[pallet::getter(fn something)]
|
||||
// Learn more about declaring storage items:
|
||||
// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items
|
||||
pub type Something<T> = StorageValue<_, u32>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::{mock::*, Error};
|
||||
use crate::{mock::*, Error, Something};
|
||||
use frame_support::{assert_noop, assert_ok};
|
||||
|
||||
#[test]
|
||||
@@ -7,7 +7,7 @@ fn it_works_for_default_value() {
|
||||
// Dispatch a signed extrinsic.
|
||||
assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));
|
||||
// Read pallet storage and assert an expected result.
|
||||
assert_eq!(TemplateModule::something(), Some(42));
|
||||
assert_eq!(Something::<Test>::get(), Some(42));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user