-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed pallet::getter
from example pallets
#3371
Changes from 5 commits
071236c
e66ca71
e11f534
9293f69
8ab9f39
a231d6c
9d21e58
4c4f146
835ae80
6c28792
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{mock::*, Error, Event}; | ||
use crate::{mock::*, Error, Event, Something}; | ||
use frame_support::{assert_noop, assert_ok}; | ||
|
||
#[test] | ||
|
@@ -9,7 +9,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)); | ||
// Assert that the correct event was deposited | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im not sure if we settled on a preferred syntax, this turbofish vs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes and yes. |
||
System::assert_last_event(Event::SomethingStored { something: 42, who: 1 }.into()); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update https://github.com/substrate-developer-hub/substrate-node-template as well? see #3155