Fix tests.

This commit is contained in:
James Cole 2016-12-30 13:54:11 +01:00
parent a5036c86dc
commit 44b8e48c3a
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -123,7 +123,7 @@ class PiggyBankControllerTest extends TestCase
*/ */
public function testPostAdd() public function testPostAdd()
{ {
$data = ['amount' => 1]; $data = ['amount' => '1.123'];
$this->be($this->user()); $this->be($this->user());
$this->call('post', route('piggy-banks.add', [1]), $data); $this->call('post', route('piggy-banks.add', [1]), $data);
$this->assertResponseStatus(302); $this->assertResponseStatus(302);
@ -136,7 +136,7 @@ class PiggyBankControllerTest extends TestCase
*/ */
public function testPostRemove() public function testPostRemove()
{ {
$data = ['amount' => 1]; $data = ['amount' => '1.123'];
$this->be($this->user()); $this->be($this->user());
$this->call('post', route('piggy-banks.remove', [1]), $data); $this->call('post', route('piggy-banks.remove', [1]), $data);
$this->assertResponseStatus(302); $this->assertResponseStatus(302);
@ -184,7 +184,7 @@ class PiggyBankControllerTest extends TestCase
$this->session(['piggy-banks.create.url' => 'http://localhost']); $this->session(['piggy-banks.create.url' => 'http://localhost']);
$data = [ $data = [
'name' => 'Piggy ' . rand(999, 10000), 'name' => 'Piggy ' . rand(999, 10000),
'targetamount' => 100, 'targetamount' => '100.123',
'account_id' => 2, 'account_id' => 2,
'amount_currency_id_targetamount' => 1, 'amount_currency_id_targetamount' => 1,
@ -204,7 +204,7 @@ class PiggyBankControllerTest extends TestCase
$this->session(['piggy-banks.edit.url' => 'http://localhost']); $this->session(['piggy-banks.edit.url' => 'http://localhost']);
$data = [ $data = [
'name' => 'Updated Piggy ' . rand(999, 10000), 'name' => 'Updated Piggy ' . rand(999, 10000),
'targetamount' => 100, 'targetamount' => '100.123',
'account_id' => 2, 'account_id' => 2,
'amount_currency_id_targetamount' => 1, 'amount_currency_id_targetamount' => 1,