From 26f196a0672c5cbf1867cc25373cb2852929a9e6 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 Dec 2017 21:05:12 +0100 Subject: [PATCH] Finally remove incomplete test flag --- .../Controllers/Transaction/SplitControllerTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Controllers/Transaction/SplitControllerTest.php b/tests/Feature/Controllers/Transaction/SplitControllerTest.php index dbaf6600e4..a193a90ab6 100644 --- a/tests/Feature/Controllers/Transaction/SplitControllerTest.php +++ b/tests/Feature/Controllers/Transaction/SplitControllerTest.php @@ -122,15 +122,15 @@ class SplitControllerTest extends TestCase */ public function testUpdate() { - $this->markTestIncomplete('Mockery cannot yet handle PHP7.1 null argument method things.'); + //$this->markTestIncomplete('Mockery cannot yet handle PHP7.1 null argument method things.'); $this->session(['transactions.edit-split.uri' => 'http://localhost']); - $deposit = TransactionJournal::where('transaction_type_id', 2)->where('user_id', $this->user()->id)->first(); + $deposit = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first(); $data = [ 'id' => $deposit->id, 'what' => 'deposit', 'journal_description' => 'Updated salary', - 'currency_id' => 1, + 'journal_currency_id' => 1, 'journal_destination_account_id' => 1, 'journal_amount' => 1591, 'date' => '2014-01-24', @@ -158,6 +158,7 @@ class SplitControllerTest extends TestCase $this->be($this->user()); $response = $this->post(route('transactions.split.update', [$deposit->id]), $data); $response->assertStatus(302); + $response->assertRedirect(route('index')); $response->assertSessionHas('success'); // journal is updated?