Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
8d7a30d7
Commit
8d7a30d7
authored
3 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
fix tests
parent
f3a556ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pallets/certification/src/tests.rs
+1
-1
1 addition, 1 deletion
pallets/certification/src/tests.rs
pallets/identity/src/tests.rs
+4
-4
4 additions, 4 deletions
pallets/identity/src/tests.rs
with
5 additions
and
5 deletions
pallets/certification/src/tests.rs
+
1
−
1
View file @
8d7a30d7
...
...
@@ -17,7 +17,7 @@
use
crate
::
mock
::
*
;
use
crate
::
Error
;
use
frame_support
::
assert_ok
;
use
frame_system
::{
EventRecord
,
Phase
};
//
use frame_system::{EventRecord, Phase};
use
maplit
::{
btreemap
,
btreeset
};
use
sp_std
::
collections
::
btree_map
::
BTreeMap
;
...
...
This diff is collapsed.
Click to expand it.
pallets/identity/src/tests.rs
+
4
−
4
View file @
8d7a30d7
...
...
@@ -64,7 +64,7 @@ fn test_two_identities() {
// Add right Right1 for Did(0)
// Should succes and trigger the correct event
assert_ok!
(
Identity
::
add_right
(
Origin
::
root
(),
0
,
Right
::
Right1
));
assert_ok!
(
Identity
::
add_right
(
Origin
::
root
(),
1
,
Right
::
Right1
));
let
events
=
System
::
events
();
assert_eq!
(
events
.len
(),
1
);
assert_eq!
(
...
...
@@ -78,7 +78,7 @@ fn test_two_identities() {
// Add right Right2 for Did(0)
// Should fail because Did(0) already have this right
assert_err!
(
Identity
::
add_right
(
Origin
::
root
(),
0
,
Right
::
Right2
),
Identity
::
add_right
(
Origin
::
root
(),
1
,
Right
::
Right2
),
Error
::
<
Test
>
::
RightAlreadyAdded
);
...
...
@@ -86,7 +86,7 @@ fn test_two_identities() {
// Delete right Right1 for Did(1)
// Should succes and trigger the correct event
assert_ok!
(
Identity
::
del_right
(
Origin
::
root
(),
1
,
Right
::
Right1
));
assert_ok!
(
Identity
::
del_right
(
Origin
::
root
(),
2
,
Right
::
Right1
));
let
events
=
System
::
events
();
assert_eq!
(
events
.len
(),
2
);
assert_eq!
(
...
...
@@ -99,7 +99,7 @@ fn test_two_identities() {
);
// The Did(1) identity has no more rights, the inactivity period must start to run
let
idty2
=
Identity
::
identity
(
1
);
let
idty2
=
Identity
::
identity
(
2
);
assert!
(
idty2
.rights
.is_empty
());
assert_eq!
(
idty2
.removable_on
,
7
);
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment