@@ -1269,12 +1269,9 @@ mod test {
1269
1269
1270
1270
// Testing for no accounting yet
1271
1271
{
1272
- let res =
1272
+ let accounting_response =
1273
1273
get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) )
1274
- . await ;
1275
- assert ! ( res. is_ok( ) ) ;
1276
-
1277
- let accounting_response = res. unwrap ( ) ;
1274
+ . await . expect ( "shoul get accounting" ) ;
1278
1275
1279
1276
assert_eq ! ( accounting_response. balances. earners. len( ) , 0 ) ;
1280
1277
assert_eq ! ( accounting_response. balances. spenders. len( ) , 0 ) ;
@@ -1297,12 +1294,9 @@ mod test {
1297
1294
. await
1298
1295
. expect ( "should spend" ) ;
1299
1296
1300
- let res =
1297
+ let accounting_response =
1301
1298
get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) )
1302
- . await ;
1303
- assert ! ( res. is_ok( ) ) ;
1304
-
1305
- let accounting_response = res. unwrap ( ) ;
1299
+ . await . expect ( "should get accounting" ) ;
1306
1300
1307
1301
assert_eq ! ( balances, accounting_response. balances) ;
1308
1302
}
@@ -1333,12 +1327,9 @@ mod test {
1333
1327
. await
1334
1328
. expect ( "should spend" ) ;
1335
1329
1336
- let res =
1330
+ let accounting_response =
1337
1331
get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) )
1338
- . await ;
1339
- assert ! ( res. is_ok( ) ) ;
1340
-
1341
- let accounting_response = res. unwrap ( ) ;
1332
+ . await . expect ( "shoul get accounting" ) ;
1342
1333
1343
1334
assert_eq ! ( balances, accounting_response. balances)
1344
1335
}
@@ -1395,14 +1386,10 @@ mod test {
1395
1386
Extension ( channel_context. clone ( ) ) ,
1396
1387
Path ( ( channel_context. context . id ( ) , * CREATOR ) ) ,
1397
1388
)
1398
- . await ;
1399
- assert ! ( res. is_ok( ) ) ;
1400
-
1401
- let res =
1402
- get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) ) . await ;
1403
- assert ! ( res. is_ok( ) ) ;
1389
+ . await . expect ( "should get spender leaf" ) ;
1404
1390
1405
- let accounting_response = res. unwrap ( ) ;
1391
+ let accounting_response =
1392
+ get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) ) . await . expect ( "should get accounting" ) ;
1406
1393
1407
1394
// Making sure a new entry has been created
1408
1395
assert_eq ! (
@@ -1425,11 +1412,8 @@ mod test {
1425
1412
. await
1426
1413
. expect ( "should spend" ) ;
1427
1414
1428
- let res =
1429
- get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) ) . await ;
1430
- assert ! ( res. is_ok( ) ) ;
1431
-
1432
- let accounting_response = res. unwrap ( ) ;
1415
+ let accounting_response =
1416
+ get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) ) . await . expect ( "should get accounting" ) ;
1433
1417
1434
1418
assert_eq ! ( balances, accounting_response. balances) ;
1435
1419
@@ -1441,11 +1425,8 @@ mod test {
1441
1425
. await ;
1442
1426
assert ! ( res. is_ok( ) ) ;
1443
1427
1444
- let res =
1445
- get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) ) . await ;
1446
- assert ! ( res. is_ok( ) ) ;
1447
-
1448
- let accounting_response = res. unwrap ( ) ;
1428
+ let accounting_response =
1429
+ get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) ) . await . expect ( "should get accounting" ) ;
1449
1430
1450
1431
// Balances shouldn't change
1451
1432
assert_eq ! (
0 commit comments