Skip to content

Commit

Permalink
Simplify variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Jan 24, 2024
1 parent bc62b07 commit c3f3502
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions internal/notification/notification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ func TestSendWithDuration(t *testing.T) {
t.Skip("Skipping testing in CI environment")
}

sound := new(bool)
*sound = false // being tested in sound package
after := new(time.Duration)
*after = time.Duration(5) * time.Second
sound := false // being tested in sound package
after := time.Duration(5) * time.Second

t.Log("You should see a notification!")
go func() {
time.Sleep(*after)
time.Sleep(after)
t.Log("The notification should have disappeared!")
}()

err := SendWithDuration(
context.Background(),
after,
sound,
&after,
&sound,
"Test notification title",
"Test notification text",
)
Expand Down

0 comments on commit c3f3502

Please sign in to comment.