GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — rewrite-laravel ( 600c36...11aeee )
by Oliver
03:44
created

it_can_get_all_transactions()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 34
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 34
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 24
nc 1
nop 0
1
<?php
2
3
namespace Tests\Feature\Api;
4
5
use App\Models\Transaction;
6
use Tests\Features\TestCase;
7
8
class TransactionController extends TestCase
9
{
10
    /**
11
     * A basic test example.
12
     * @test
13
     * @return void
14
     */
15
    public function it_can_get_all_transactions()
16
    {
17
        // Arrange
18
        $url = '/api/v1/transactions';
19
        $transaction = factory(Transaction::class)->create();
20
21
        // Act
22
        $response = $this->get($url);
23
24
        // Assert
25
        $response->assertStatus(200)
26
            ->assertJsonFragment([
27
                'id'                => $transaction->id,
28
                'status'            => [
29
                    'id'   => $transaction->status->id,
30
                    'name' => $transaction->status->name,
31
                    'slug' => $transaction->status->slug
32
                ],
33
                'type'              => [
34
                    'id'   => $transaction->type->id,
35
                    'name' => $transaction->type->name,
36
                    'slug' => $transaction->type->slug
37
                ],
38
                'account_name'      => $transaction->account_name,
39
                'to_account_name'   => $transaction->to_account_name,
40
                'payee_name'        => $transaction->payee_name,
41
                'category_name'     => $transaction->category_name,
42
                'sub_category_name' => $transaction->sub_category_name,
43
                'amount'            => round($transaction->amount, 2),
44
                'notes'             => $transaction->notes,
45
                'created_at'        => $transaction->created_at->toIso8601String(),
46
                'updated_at'        => $transaction->updated_at->toIso8601String()
47
            ]);
48
    }
49
}
50