Skip to content

Commit 14201d9

Browse files
committed
Fix tests
1 parent 8575879 commit 14201d9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/ExpoChannel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public function send($notifiable, Notification $notification)
4848
$interest = $notifiable->routeNotificationFor('ExpoPushNotifications')
4949
?: $this->interestName($notifiable);
5050

51+
$interests = [ $interest ];
52+
5153
try {
5254
$this->expo->notify(
53-
$interest,
55+
$interests,
5456
$notification->toExpoPush($notifiable)->toArray(),
5557
config('exponent-push-notifications.debug')
5658
);

tests/ChannelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function itCanSendANotification()
6868

6969
$data = $message->toArray();
7070

71-
$this->expo->shouldReceive('notify')->with('interest_name', $data, true)->andReturn([['status' => 'ok']]);
71+
$this->expo->shouldReceive('notify')->with(['interest_name'], $data, true)->andReturn([['status' => 'ok']]);
7272

7373
$this->channel->send($this->notifiable, $this->notification);
7474
}
@@ -80,7 +80,7 @@ public function itFiresFailureEventOnFailure()
8080

8181
$data = $message->toArray();
8282

83-
$this->expo->shouldReceive('notify')->with('interest_name', $data, true)->andThrow(ExpoException::class, '');
83+
$this->expo->shouldReceive('notify')->with(['interest_name'], $data, true)->andThrow(ExpoException::class, '');
8484

8585
$this->events->shouldReceive('dispatch')->with(Mockery::type(NotificationFailed::class));
8686

0 commit comments

Comments
 (0)