@@ -1269,12 +1269,10 @@ 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
1275
+ . expect ( "shoul get accounting" ) ;
1278
1276
1279
1277
assert_eq ! ( accounting_response. balances. earners. len( ) , 0 ) ;
1280
1278
assert_eq ! ( accounting_response. balances. spenders. len( ) , 0 ) ;
@@ -1297,12 +1295,10 @@ mod test {
1297
1295
. await
1298
1296
. expect ( "should spend" ) ;
1299
1297
1300
- let res =
1298
+ let accounting_response =
1301
1299
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 ( ) ;
1300
+ . await
1301
+ . expect ( "should get accounting" ) ;
1306
1302
1307
1303
assert_eq ! ( balances, accounting_response. balances) ;
1308
1304
}
@@ -1333,12 +1329,10 @@ mod test {
1333
1329
. await
1334
1330
. expect ( "should spend" ) ;
1335
1331
1336
- let res =
1332
+ let accounting_response =
1337
1333
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 ( ) ;
1334
+ . await
1335
+ . expect ( "shoul get accounting" ) ;
1342
1336
1343
1337
assert_eq ! ( balances, accounting_response. balances)
1344
1338
}
@@ -1395,14 +1389,13 @@ mod test {
1395
1389
Extension ( channel_context. clone ( ) ) ,
1396
1390
Path ( ( channel_context. context . id ( ) , * CREATOR ) ) ,
1397
1391
)
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( ) ) ;
1392
+ . await
1393
+ . expect ( "should get spender leaf" ) ;
1404
1394
1405
- let accounting_response = res. unwrap ( ) ;
1395
+ let accounting_response =
1396
+ get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) )
1397
+ . await
1398
+ . expect ( "should get accounting" ) ;
1406
1399
1407
1400
// Making sure a new entry has been created
1408
1401
assert_eq ! (
@@ -1425,11 +1418,10 @@ mod test {
1425
1418
. await
1426
1419
. expect ( "should spend" ) ;
1427
1420
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 ( ) ;
1421
+ let accounting_response =
1422
+ get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) )
1423
+ . await
1424
+ . expect ( "should get accounting" ) ;
1433
1425
1434
1426
assert_eq ! ( balances, accounting_response. balances) ;
1435
1427
@@ -1441,11 +1433,10 @@ mod test {
1441
1433
. await ;
1442
1434
assert ! ( res. is_ok( ) ) ;
1443
1435
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 ( ) ;
1436
+ let accounting_response =
1437
+ get_accounting_for_channel_axum ( app. clone ( ) , Extension ( channel_context. clone ( ) ) )
1438
+ . await
1439
+ . expect ( "should get accounting" ) ;
1449
1440
1450
1441
// Balances shouldn't change
1451
1442
assert_eq ! (
0 commit comments