diff --git a/src/tests/Unit/TransactionTest.php b/src/tests/Unit/TransactionTest.php index d945a2e7..eed18510 100644 --- a/src/tests/Unit/TransactionTest.php +++ b/src/tests/Unit/TransactionTest.php @@ -1,61 +1,62 @@ get(); foreach ($transactions as $transaction) { $this->assertNotNull($transaction->toString()); } } public function testWalletPenalty() { $user = $this->getTestUser('jane@kolabnow.com'); $wallet = $user->wallets()->first(); - $transaction = \App\Transaction::create( + $transaction = Transaction::create( [ 'object_id' => $wallet->id, 'object_type' => \App\Wallet::class, - 'type' => \App\Transaction::WALLET_PENALTY, + 'type' => Transaction::WALLET_PENALTY, 'amount' => 9 ] ); - $this->assertEquals($transaction->{'type'}, 'penalty'); + $this->assertEquals($transaction->{'type'}, Transaction::WALLET_PENALTY); } public function testInvalidType() { $user = $this->getTestUser('jane@kolabnow.com'); $wallet = $user->wallets()->first(); $this->expectException(\Exception::class); - $transaction = \App\Transaction::create( + $transaction = Transaction::create( [ 'object_id' => $wallet->id, 'object_type' => \App\Wallet::class, 'type' => 'invalid', 'amount' => 9 ] ); } }