@@ -10,9 +10,6 @@ describe('faucet hook', () => {
10
10
} ,
11
11
sign : vi . fn ( ) ,
12
12
isMounted : true ,
13
- isAgent : true ,
14
- isOwner : true ,
15
- isInvestor : true ,
16
13
isGasPayable : true ,
17
14
} ) ,
18
15
useNetwork : vi . fn ( ) . mockReturnValue ( {
@@ -76,15 +73,12 @@ describe('faucet hook', () => {
76
73
} ) ;
77
74
78
75
describe ( 'isAllowed' , ( ) => {
79
- it ( 'should return true, when account is mounted, when it is owner, when gas is NOT payable, when network is development' , ( ) => {
76
+ it ( 'should return true, when account is mounted, when gas is NOT payable, when network is development' , ( ) => {
80
77
mocksHook . useAccount . mockImplementation ( ( ) => ( {
81
78
account : {
82
79
address : 'k:he-man' ,
83
80
} ,
84
81
isMounted : true ,
85
- isAgent : false ,
86
- isOwner : true ,
87
- isInvestor : false ,
88
82
isGasPayable : false ,
89
83
} ) ) ;
90
84
@@ -99,15 +93,12 @@ describe('faucet hook', () => {
99
93
} ) ;
100
94
} ) ;
101
95
102
- it ( 'should return false, when account is NOT mounted, when it is owner, when gas is NOT payable, when network is development' , ( ) => {
96
+ it ( 'should return false, when account is NOT mounted, when gas is NOT payable, when network is development' , ( ) => {
103
97
mocksHook . useAccount . mockImplementation ( ( ) => ( {
104
98
account : {
105
99
address : 'k:he-man' ,
106
100
} ,
107
101
isMounted : false ,
108
- isAgent : false ,
109
- isOwner : true ,
110
- isInvestor : false ,
111
102
isGasPayable : false ,
112
103
} ) ) ;
113
104
@@ -121,37 +112,12 @@ describe('faucet hook', () => {
121
112
expect ( result . current . isAllowed ) . toBe ( false ) ;
122
113
} ) ;
123
114
124
- it ( 'should return false, when account is mounted, when account has no role, when gas is NOT payable, when network is development' , ( ) => {
115
+ it ( 'should return false, when account is mounted, when gas is payable, when network is development' , ( ) => {
125
116
mocksHook . useAccount . mockImplementation ( ( ) => ( {
126
117
account : {
127
118
address : 'k:he-man' ,
128
119
} ,
129
120
isMounted : true ,
130
- isAgent : false ,
131
- isOwner : false ,
132
- isInvestor : false ,
133
- isGasPayable : false ,
134
- } ) ) ;
135
-
136
- mocksHook . useNetwork . mockImplementation ( ( ) => ( {
137
- ...mocksHook . useNetwork . getMockImplementation ( ) ,
138
- activeNetwork : { networkId : 'development' } ,
139
- } ) ) ;
140
-
141
- const { result } = renderHook ( ( ) => useFaucet ( ) ) ;
142
-
143
- expect ( result . current . isAllowed ) . toBe ( false ) ;
144
- } ) ;
145
-
146
- it ( 'should return false, when account is mounted, when account isinvestor, when gas is payable, when network is development' , ( ) => {
147
- mocksHook . useAccount . mockImplementation ( ( ) => ( {
148
- account : {
149
- address : 'k:he-man' ,
150
- } ,
151
- isMounted : true ,
152
- isAgent : false ,
153
- isOwner : false ,
154
- isInvestor : true ,
155
121
isGasPayable : true ,
156
122
} ) ) ;
157
123
@@ -165,15 +131,12 @@ describe('faucet hook', () => {
165
131
expect ( result . current . isAllowed ) . toBe ( false ) ;
166
132
} ) ;
167
133
168
- it ( 'should return false, when account is mounted, when account isagent, when gas is NOT payable, when network is mainnet' , ( ) => {
134
+ it ( 'should return false, when account is mounted, when gas is NOT payable, when network is mainnet' , ( ) => {
169
135
mocksHook . useAccount . mockImplementation ( ( ) => ( {
170
136
account : {
171
137
address : 'k:he-man' ,
172
138
} ,
173
139
isMounted : false ,
174
- isAgent : true ,
175
- isOwner : false ,
176
- isInvestor : true ,
177
140
isGasPayable : false ,
178
141
} ) ) ;
179
142
0 commit comments