Skip to content

Commit

Permalink
Aumentar cobertura de teste
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielpeixoto committed May 22, 2020
1 parent a37f202 commit 6600910
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/receipt.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<!-- Organization Name / Image -->
<td align="right">
<strong>{{ $header or $vendor }}</strong>
<strong>{{ $vendor }}</strong>
</td>
</tr>
<tr valign="top">
Expand Down
11 changes: 10 additions & 1 deletion tests/GuPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ public function testSubscriptionsCanBeCreated()
$this->assertFalse($invoice->hasDiscount());
$this->assertInstanceOf(Carbon::class, $invoice->date());


// Invoice PDF test
$pdf = $user->downloadInvoice($invoice->id, [
'vendor' => 'Sua Empresa',
'product' => 'Seu Produto'
]);

// Then just save it like this
$this->assertStringStartsWith('%PDF-1.3', $pdf->getContent());

// Swap plan, but skip charge
// Swap Plan
$subscription->swap('gold', true);
Expand Down Expand Up @@ -705,7 +715,6 @@ public function testCreateInvoice()

$this->assertEquals($invoice->payable_with, 'all');
$this->assertEquals($invoice->total, 'R$ 3,00');

}

public function testCreatingSubscriptionWithRecurrentDiscount()
Expand Down

0 comments on commit 6600910

Please sign in to comment.