Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests
  • Loading branch information
kostekIV committed Jan 18, 2023
commit 26b5c2458e8aea15dad45b49145d9aaeb7d601d3
1 change: 1 addition & 0 deletions pallets/aleph/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl Config for Test {
type RuntimeEvent = RuntimeEvent;
type SessionInfoProvider = Session;
type SessionManager = ();
type NextSessionAuthorityProvider = Session;
}

pub fn to_authority(id: &u64) -> AuthorityId {
Expand Down
4 changes: 3 additions & 1 deletion pallets/aleph/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ fn test_initialize_authorities() {
}

#[test]
#[should_panic]
fn fails_to_initialize_again_authorities() {
new_test_ext(&[(1u64, 1u64), (2u64, 2u64)]).execute_with(|| {
let authorities = to_authorities(&[1, 2, 3]);
Aleph::initialize_authorities(&authorities, &authorities);

// should not update storage
assert_eq!(Aleph::authorities(), to_authorities(&[1, 2]));
});
}

Expand Down