Skip to content

Commit

Permalink
do not always set content-available and mutable-content
Browse files Browse the repository at this point in the history
  • Loading branch information
koenhoeijmakers committed Nov 24, 2020
1 parent 853cfd1 commit a5515b7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/ApnAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ public function it_adapts_content_available()
$this->assertTrue($notification->getPayload()->isContentAvailable());
}

/** @test */
public function it_does_not_set_content_available_by_default()
{
$message = (new ApnMessage);

$notification = $this->adapter->adapt($message, 'token');

$this->assertNull($notification->getPayload()->isContentAvailable());
}

/** @test */
public function it_adapts_mutable_content()
{
Expand All @@ -55,6 +65,16 @@ public function it_adapts_mutable_content()
$this->assertTrue($notification->getPayload()->hasMutableContent());
}

/** @test */
public function it_does_not_set_mutable_content_by_default()
{
$message = (new ApnMessage);

$notification = $this->adapter->adapt($message, 'token');

$this->assertNull($notification->getPayload()->hasMutableContent());
}

/** @test */
public function it_adapts_badge()
{
Expand Down

0 comments on commit a5515b7

Please sign in to comment.