Skip to content

Commit 7981ebd

Browse files
committed
fix: fixing the coding style
1 parent 865cb24 commit 7981ebd

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

packages/r/karma1337/geo-resto/auth_trusted_verifier_test.gno

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,50 @@ import (
55
)
66

77
func TestTrustedVerifierOwnerFlow(t *testing.T) {
8-
// Owner should be able to add and remove trusted verifiers
9-
owner := authManager.Authorizable.Owner()
10-
addr := "g1verifier_test"
11-
12-
added := authManager.AddTrustedVerifier(addr, owner)
13-
if !added {
14-
t.Fatal("Owner should be able to add trusted verifier")
15-
}
16-
17-
if !authManager.IsTrustedVerifier(addr) {
18-
t.Fatal("Added address should be trusted")
19-
}
20-
21-
removed := authManager.RemoveTrustedVerifier(addr, owner)
22-
if !removed {
23-
t.Fatal("Owner should be able to remove trusted verifier")
24-
}
25-
26-
if authManager.IsTrustedVerifier(addr) {
27-
t.Fatal("Removed address should not be trusted")
28-
}
8+
// Owner should be able to add and remove trusted verifiers
9+
owner := authManager.Authorizable.Owner()
10+
addr := "g1verifier_test"
11+
12+
added := authManager.AddTrustedVerifier(addr, owner)
13+
if !added {
14+
t.Fatal("Owner should be able to add trusted verifier")
15+
}
16+
17+
if !authManager.IsTrustedVerifier(addr) {
18+
t.Fatal("Added address should be trusted")
19+
}
20+
21+
removed := authManager.RemoveTrustedVerifier(addr, owner)
22+
if !removed {
23+
t.Fatal("Owner should be able to remove trusted verifier")
24+
}
25+
26+
if authManager.IsTrustedVerifier(addr) {
27+
t.Fatal("Removed address should not be trusted")
28+
}
2929
}
3030

3131
func TestTrustedVerifierNonOwnerRejected(t *testing.T) {
32-
owner := authManager.Authorizable.Owner()
33-
nonOwner := address("g1notowner")
34-
addr := "g1verifier_test2"
35-
36-
added := authManager.AddTrustedVerifier(addr, nonOwner)
37-
if added {
38-
t.Error("Non-owner should not be able to add trusted verifier")
39-
}
40-
41-
// Ensure owner can add, then non-owner cannot remove
42-
addedOwner := authManager.AddTrustedVerifier(addr, owner)
43-
if !addedOwner {
44-
t.Fatal("Owner should be able to add trusted verifier")
45-
}
46-
47-
removedByNonOwner := authManager.RemoveTrustedVerifier(addr, nonOwner)
48-
if removedByNonOwner {
49-
t.Error("Non-owner should not be able to remove trusted verifier")
50-
}
51-
52-
// Clean up
53-
authManager.RemoveTrustedVerifier(addr, owner)
32+
owner := authManager.Authorizable.Owner()
33+
nonOwner := address("g1notowner")
34+
addr := "g1verifier_test2"
35+
36+
added := authManager.AddTrustedVerifier(addr, nonOwner)
37+
if added {
38+
t.Error("Non-owner should not be able to add trusted verifier")
39+
}
40+
41+
// Ensure owner can add, then non-owner cannot remove
42+
addedOwner := authManager.AddTrustedVerifier(addr, owner)
43+
if !addedOwner {
44+
t.Fatal("Owner should be able to add trusted verifier")
45+
}
46+
47+
removedByNonOwner := authManager.RemoveTrustedVerifier(addr, nonOwner)
48+
if removedByNonOwner {
49+
t.Error("Non-owner should not be able to remove trusted verifier")
50+
}
51+
52+
// Clean up
53+
authManager.RemoveTrustedVerifier(addr, owner)
5454
}

0 commit comments

Comments
 (0)