@@ -130,19 +130,23 @@ contract(
130
130
131
131
describe ( 'Property; constructor' , ( ) => {
132
132
it ( 'Cannot be created from other than factory' , async ( ) => {
133
- const result = await propertyContract
134
- . new ( dev . addressRegistry . address , author , 'sample' , 'SAMPLE' , {
133
+ const propertyInstance = await propertyContract . new ( )
134
+
135
+ const result = await propertyInstance
136
+ . initialize ( dev . addressRegistry . address , author , 'sample' , 'SAMPLE' , {
135
137
from : deployer ,
136
138
} )
137
139
. catch ( ( err : Error ) => err )
140
+
138
141
validateAddressErrorMessage ( result )
139
142
} )
140
143
it ( 'The author, decimal places, and number of issues are fixed values' , async ( ) => {
141
144
await dev . addressRegistry . setRegistry (
142
145
'PropertyFactory' ,
143
146
propertyFactory
144
147
)
145
- const propertyInstance = await propertyContract . new (
148
+ const propertyInstance = await propertyContract . new ( )
149
+ await propertyInstance . initialize (
146
150
dev . addressRegistry . address ,
147
151
author ,
148
152
'sample' ,
@@ -179,7 +183,8 @@ contract(
179
183
'PropertyFactory' ,
180
184
propertyFactory
181
185
)
182
- const propertyInstance = await propertyContract . new (
186
+ const propertyInstance = await propertyContract . new ( )
187
+ await propertyInstance . initialize (
183
188
dev . addressRegistry . address ,
184
189
author ,
185
190
'sample' ,
@@ -214,7 +219,8 @@ contract(
214
219
'PropertyFactory' ,
215
220
propertyFactory
216
221
)
217
- const propertyInstance = await propertyContract . new (
222
+ const propertyInstance = await propertyContract . new ( )
223
+ await propertyInstance . initialize (
218
224
dev . addressRegistry . address ,
219
225
author ,
220
226
'sample' ,
@@ -238,7 +244,8 @@ contract(
238
244
'PropertyFactory' ,
239
245
propertyFactory
240
246
)
241
- const propertyInstance = await propertyContract . new (
247
+ const propertyInstance = await propertyContract . new ( )
248
+ await propertyInstance . initialize (
242
249
dev . addressRegistry . address ,
243
250
author ,
244
251
'sample' ,
@@ -273,7 +280,8 @@ contract(
273
280
'PropertyFactory' ,
274
281
propertyFactory
275
282
)
276
- const propertyInstance = await propertyContract . new (
283
+ const propertyInstance = await propertyContract . new ( )
284
+ await propertyInstance . initialize (
277
285
dev . addressRegistry . address ,
278
286
author ,
279
287
'sample' ,
0 commit comments