Skip to content

Commit 6f131a1

Browse files
committed
accounts+refactor: improve test readability
1 parent 7fa370e commit 6f131a1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

accounts/service_test.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ func TestAccountService(t *testing.T) {
261261

262262
// Ensure that the service was eventually disabled.
263263
assertEventually(t, func() bool {
264-
isRunning := s.IsRunning()
265-
return isRunning == false
264+
return !s.IsRunning()
266265
})
267266
lnd.assertMainErrContains(t, ErrDBClosed.Error())
268267
},
@@ -294,8 +293,7 @@ func TestAccountService(t *testing.T) {
294293

295294
// Ensure that the service was eventually disabled.
296295
assertEventually(t, func() bool {
297-
isRunning := s.IsRunning()
298-
return isRunning == false
296+
return !s.IsRunning()
299297
})
300298

301299
lnd.assertMainErrContains(t, testErr.Error())
@@ -440,8 +438,7 @@ func TestAccountService(t *testing.T) {
440438

441439
// Ensure that the service was eventually disabled.
442440
assertEventually(t, func() bool {
443-
isRunning := s.IsRunning()
444-
return isRunning == false
441+
return !s.IsRunning()
445442
})
446443
lnd.assertMainErrContains(
447444
t, "not mapped to any account",
@@ -483,8 +480,7 @@ func TestAccountService(t *testing.T) {
483480

484481
// Ensure that the service was eventually disabled.
485482
assertEventually(t, func() bool {
486-
isRunning := s.IsRunning()
487-
return isRunning == false
483+
return !s.IsRunning()
488484
})
489485

490486
lnd.assertMainErrContains(t, testErr.Error())

0 commit comments

Comments
 (0)