More cleanup.

This commit is contained in:
James Cole
2016-01-24 18:11:57 +01:00
parent 7b2fe8eb4a
commit a013553a6c
18 changed files with 227 additions and 225 deletions

View File

@@ -18,8 +18,8 @@ class AccountControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/accounts/create/asset'); $this->call('GET', '/accounts/create/asset');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -28,8 +28,8 @@ class AccountControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/accounts/delete/1'); $this->call('GET', '/accounts/delete/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -39,9 +39,9 @@ class AccountControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$this->session(['accounts.delete.url' => 'http://localhost']); $this->session(['accounts.delete.url' => 'http://localhost']);
$response = $this->call('POST', '/accounts/destroy/6'); $this->call('POST', '/accounts/destroy/6');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -50,8 +50,8 @@ class AccountControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/accounts/edit/1'); $this->call('GET', '/accounts/edit/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -61,8 +61,8 @@ class AccountControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/accounts/asset'); $this->call('GET', '/accounts/asset');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -71,8 +71,8 @@ class AccountControllerTest extends TestCase
public function testShow() public function testShow()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/accounts/show/1'); $this->call('GET', '/accounts/show/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -89,8 +89,8 @@ class AccountControllerTest extends TestCase
'amount_currency_id_openingBalance' => 1, 'amount_currency_id_openingBalance' => 1,
]; ];
$response = $this->call('POST', '/accounts/store', $args); $this->call('POST', '/accounts/store', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
@@ -108,8 +108,9 @@ class AccountControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/accounts/update/1', $args); $this->call('POST', '/accounts/update/1', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }

View File

@@ -19,8 +19,8 @@ class AttachmentControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/attachment/delete/1'); $this->call('GET', '/attachment/delete/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -30,8 +30,8 @@ class AttachmentControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$this->session(['attachments.delete.url' => 'http://localhost']); $this->session(['attachments.delete.url' => 'http://localhost']);
$response = $this->call('POST', '/attachment/destroy/2'); $this->call('POST', '/attachment/destroy/2');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -40,8 +40,8 @@ class AttachmentControllerTest extends TestCase
public function testDownload() public function testDownload()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/attachment/download/1'); $this->call('GET', '/attachment/download/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -50,8 +50,8 @@ class AttachmentControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/attachment/edit/1'); $this->call('GET', '/attachment/edit/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -60,8 +60,8 @@ class AttachmentControllerTest extends TestCase
public function testPreview() public function testPreview()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/attachment/preview/1'); $this->call('GET', '/attachment/preview/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -78,8 +78,8 @@ class AttachmentControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/attachment/update/1', $args); $this->call('POST', '/attachment/update/1', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
} }

View File

@@ -18,8 +18,8 @@ class AuthControllerTest extends TestCase
*/ */
public function testGetLogin() public function testGetLogin()
{ {
$response = $this->call('GET', '/login'); $this->call('GET', '/login');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -28,8 +28,8 @@ class AuthControllerTest extends TestCase
public function testGetLogout() public function testGetLogout()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/logout'); $this->call('GET', '/logout');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -37,8 +37,8 @@ class AuthControllerTest extends TestCase
*/ */
public function testGetRegister() public function testGetRegister()
{ {
$response = $this->call('GET', '/register'); $this->call('GET', '/register');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -46,8 +46,8 @@ class AuthControllerTest extends TestCase
*/ */
public function testLogin() public function testLogin()
{ {
$response = $this->call('GET', '/login'); $this->call('GET', '/login');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -56,11 +56,12 @@ class AuthControllerTest extends TestCase
public function testLogout() public function testLogout()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/logout'); $this->call('GET', '/logout');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
// index should now redirect: // index should now redirect:
$response = $this->call('GET', '/'); $this->call('GET', '/');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
@@ -75,11 +76,11 @@ class AuthControllerTest extends TestCase
'password' => 'james', 'password' => 'james',
'remember' => 1, 'remember' => 1,
]; ];
$response = $this->call('POST', '/login', $args); $this->call('POST', '/login', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$response = $this->call('GET', '/'); $this->call('GET', '/');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
@@ -94,8 +95,8 @@ class AuthControllerTest extends TestCase
'password' => 'james123', 'password' => 'james123',
'password_confirmation' => 'james123', 'password_confirmation' => 'james123',
]; ];
$response = $this->call('POST', '/register', $args); $this->call('POST', '/register', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('start'); $this->assertSessionHas('start');
} }
@@ -104,7 +105,7 @@ class AuthControllerTest extends TestCase
*/ */
public function testRegister() public function testRegister()
{ {
$response = $this->call('GET', '/register'); $this->call('GET', '/register');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -20,8 +20,8 @@ class PasswordControllerTest extends TestCase
$args = [ $args = [
'email' => 'thegrumpydictator@gmail.com', 'email' => 'thegrumpydictator@gmail.com',
]; ];
$response = $this->call('POST', '/password/email', $args); $this->call('POST', '/password/email', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
} }

View File

@@ -20,8 +20,8 @@ class BillControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/bills/create'); $this->call('GET', '/bills/create');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -31,8 +31,8 @@ class BillControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/bills/delete/1'); $this->call('GET', '/bills/delete/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -42,9 +42,9 @@ class BillControllerTest extends TestCase
{ {
$this->session(['bills.delete.url' => 'http://localhost']); $this->session(['bills.delete.url' => 'http://localhost']);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/bills/destroy/2'); $this->call('POST', '/bills/destroy/2');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -53,8 +53,8 @@ class BillControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/bills/edit/1'); $this->call('GET', '/bills/edit/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -63,8 +63,8 @@ class BillControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/bills'); $this->call('GET', '/bills');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -73,9 +73,9 @@ class BillControllerTest extends TestCase
public function testRescan() public function testRescan()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/bills/rescan/1'); $this->call('GET', '/bills/rescan/1');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -84,8 +84,8 @@ class BillControllerTest extends TestCase
public function testShow() public function testShow()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/bills/show/1'); $this->call('GET', '/bills/show/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -107,10 +107,10 @@ class BillControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/bills/store', $args); $this->call('POST', '/bills/store', $args);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -133,9 +133,9 @@ class BillControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/bills/update/1', $args); $this->call('POST', '/bills/update/1', $args);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
} }

View File

@@ -23,8 +23,8 @@ class BudgetControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/budgets/amount/1', $args); $this->call('POST', '/budgets/amount/1', $args);
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -33,8 +33,8 @@ class BudgetControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets/create'); $this->call('GET', '/budgets/create');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -43,8 +43,8 @@ class BudgetControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets/delete/1'); $this->call('GET', '/budgets/delete/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -55,9 +55,9 @@ class BudgetControllerTest extends TestCase
$this->be($this->user()); $this->be($this->user());
$this->session(['budgets.delete.url' => 'http://localhost']); $this->session(['budgets.delete.url' => 'http://localhost']);
$response = $this->call('POST', '/budgets/destroy/2'); $this->call('POST', '/budgets/destroy/2');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -66,8 +66,8 @@ class BudgetControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets/edit/1'); $this->call('GET', '/budgets/edit/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -76,8 +76,8 @@ class BudgetControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets'); $this->call('GET', '/budgets');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -86,8 +86,8 @@ class BudgetControllerTest extends TestCase
public function testNoBudget() public function testNoBudget()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets/list/noBudget'); $this->call('GET', '/budgets/list/noBudget');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -100,8 +100,8 @@ class BudgetControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/budgets/income', $args); $this->call('POST', '/budgets/income', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -110,8 +110,8 @@ class BudgetControllerTest extends TestCase
public function testShow() public function testShow()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets/show/1'); $this->call('GET', '/budgets/show/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -125,8 +125,8 @@ class BudgetControllerTest extends TestCase
'name' => 'Some kind of test budget.', 'name' => 'Some kind of test budget.',
]; ];
$response = $this->call('POST', '/budgets/store', $args); $this->call('POST', '/budgets/store', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
@@ -141,8 +141,8 @@ class BudgetControllerTest extends TestCase
'name' => 'Some kind of test budget.', 'name' => 'Some kind of test budget.',
]; ];
$response = $this->call('POST', '/budgets/update/1', $args); $this->call('POST', '/budgets/update/1', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
@@ -152,7 +152,7 @@ class BudgetControllerTest extends TestCase
public function testUpdateIncome() public function testUpdateIncome()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/budgets/income'); $this->call('GET', '/budgets/income');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -20,8 +20,8 @@ class CategoryControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories/create'); $this->call('GET', '/categories/create');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -30,8 +30,8 @@ class CategoryControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories/delete/1'); $this->call('GET', '/categories/delete/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -43,9 +43,9 @@ class CategoryControllerTest extends TestCase
$this->session(['categories.delete.url' => 'http://localhost']); $this->session(['categories.delete.url' => 'http://localhost']);
$response = $this->call('POST', '/categories/destroy/2'); $this->call('POST', '/categories/destroy/2');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -54,8 +54,8 @@ class CategoryControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories/edit/1'); $this->call('GET', '/categories/edit/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -64,8 +64,8 @@ class CategoryControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories'); $this->call('GET', '/categories');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -74,8 +74,8 @@ class CategoryControllerTest extends TestCase
public function testNoCategory() public function testNoCategory()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories/list/noCategory'); $this->call('GET', '/categories/list/noCategory');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -85,8 +85,8 @@ class CategoryControllerTest extends TestCase
public function testShow() public function testShow()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories/show/1'); $this->call('GET', '/categories/show/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
@@ -96,8 +96,8 @@ class CategoryControllerTest extends TestCase
public function testShowWithDate() public function testShowWithDate()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/categories/show/1/20150101'); $this->call('GET', '/categories/show/1/20150101');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -111,8 +111,8 @@ class CategoryControllerTest extends TestCase
'name' => 'Some kind of test cat.', 'name' => 'Some kind of test cat.',
]; ];
$response = $this->call('POST', '/categories/store', $args); $this->call('POST', '/categories/store', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
@@ -127,8 +127,8 @@ class CategoryControllerTest extends TestCase
'name' => 'Some kind of test category.', 'name' => 'Some kind of test category.',
]; ];
$response = $this->call('POST', '/categories/update/1', $args); $this->call('POST', '/categories/update/1', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
} }

View File

@@ -18,9 +18,9 @@ class ChartAccountControllerTest extends TestCase
public function testExpenseAccounts() public function testExpenseAccounts()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/account/expense'); $this->call('GET', '/chart/account/expense');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -29,9 +29,9 @@ class ChartAccountControllerTest extends TestCase
public function testFrontpage() public function testFrontpage()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/account/frontpage'); $this->call('GET', '/chart/account/frontpage');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -40,9 +40,9 @@ class ChartAccountControllerTest extends TestCase
public function testReport() public function testReport()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/account/report/default/20160101/20160131/1'); $this->call('GET', '/chart/account/report/default/20160101/20160131/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -51,8 +51,8 @@ class ChartAccountControllerTest extends TestCase
public function testSingle() public function testSingle()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/account/1'); $this->call('GET', '/chart/account/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -19,9 +19,9 @@ class ChartBillControllerTest extends TestCase
public function testFrontpage() public function testFrontpage()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/bill/frontpage'); $this->call('GET', '/chart/bill/frontpage');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -30,8 +30,8 @@ class ChartBillControllerTest extends TestCase
public function testSingle() public function testSingle()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/bill/1'); $this->call('GET', '/chart/bill/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -27,8 +27,8 @@ class ChartBudgetControllerTest extends TestCase
$repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon); $repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/budget/1'); $this->call('GET', '/chart/budget/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
//$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); //$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
} }
@@ -38,9 +38,9 @@ class ChartBudgetControllerTest extends TestCase
public function testBudgetLimit() public function testBudgetLimit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/budget/1/1'); $this->call('GET', '/chart/budget/1/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -49,9 +49,9 @@ class ChartBudgetControllerTest extends TestCase
public function testFrontpage() public function testFrontpage()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/budget/frontpage'); $this->call('GET', '/chart/budget/frontpage');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -70,8 +70,8 @@ class ChartBudgetControllerTest extends TestCase
$repository->shouldReceive('getBudgetsAndExpensesPerYear')->once()->andReturn([]); $repository->shouldReceive('getBudgetsAndExpensesPerYear')->once()->andReturn([]);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1'); $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
@@ -84,8 +84,8 @@ class ChartBudgetControllerTest extends TestCase
$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]); $repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/budget/year/default/20150101/20151231/1'); $this->call('GET', '/chart/budget/year/default/20150101/20151231/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -20,9 +20,9 @@ class ChartCategoryControllerTest extends TestCase
public function testAll() public function testAll()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/1/all'); $this->call('GET', '/chart/category/1/all');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -31,9 +31,9 @@ class ChartCategoryControllerTest extends TestCase
public function testCurrentPeriod() public function testCurrentPeriod()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/1/period'); $this->call('GET', '/chart/category/1/period');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -45,8 +45,8 @@ class ChartCategoryControllerTest extends TestCase
$repository->shouldReceive('earnedForAccountsPerMonth')->once()->andReturn(new Collection); $repository->shouldReceive('earnedForAccountsPerMonth')->once()->andReturn(new Collection);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/earned-in-period/default/20150101/20151231/1'); $this->call('GET', '/chart/category/earned-in-period/default/20150101/20151231/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -59,8 +59,8 @@ class ChartCategoryControllerTest extends TestCase
$repository->shouldReceive('sumSpentNoCategory')->once()->andReturn('120'); $repository->shouldReceive('sumSpentNoCategory')->once()->andReturn('120');
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/frontpage'); $this->call('GET', '/chart/category/frontpage');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -72,8 +72,8 @@ class ChartCategoryControllerTest extends TestCase
$repository->shouldReceive('listMultiYear')->once()->andReturn(new Collection); $repository->shouldReceive('listMultiYear')->once()->andReturn(new Collection);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/multi-year/default/20150101/20151231/1/1'); $this->call('GET', '/chart/category/multi-year/default/20150101/20151231/1/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -82,9 +82,9 @@ class ChartCategoryControllerTest extends TestCase
public function testSpecificPeriod() public function testSpecificPeriod()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/1/period/20150101'); $this->call('GET', '/chart/category/1/period/20150101');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -98,8 +98,8 @@ class ChartCategoryControllerTest extends TestCase
$repository->shouldReceive('spentForAccountsPerMonth')->once()->andReturn(new Collection); $repository->shouldReceive('spentForAccountsPerMonth')->once()->andReturn(new Collection);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/category/spent-in-period/default/20150101/20151231/1'); $this->call('GET', '/chart/category/spent-in-period/default/20150101/20151231/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -19,7 +19,7 @@ class ChartPiggyBankControllerTest extends TestCase
public function testHistory() public function testHistory()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/piggy-bank/1'); $this->call('GET', '/chart/piggy-bank/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -22,8 +22,8 @@ class ChartReportControllerTest extends TestCase
$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]); $repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/report/in-out/default/20150101/20151231/1'); $this->call('GET', '/chart/report/in-out/default/20150101/20151231/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -36,7 +36,7 @@ class ChartReportControllerTest extends TestCase
$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]); $repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1'); $this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -24,9 +24,9 @@ class CsvControllerTest extends TestCase
// create session data: // create session data:
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('GET', '/csv/column_roles'); $this->call('GET', '/csv/column_roles');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -36,8 +36,8 @@ class CsvControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('GET', '/csv/download-config'); $this->call('GET', '/csv/download-config');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -47,8 +47,8 @@ class CsvControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('GET', '/csv/download'); $this->call('GET', '/csv/download');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -58,8 +58,8 @@ class CsvControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/csv'); $this->call('GET', '/csv');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -86,9 +86,9 @@ class CsvControllerTest extends TestCase
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('POST', '/csv/initial_parse', $postData); $this->call('POST', '/csv/initial_parse', $postData);
// should be redirect // should be redirect
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
// should be redirected to mapping: // should be redirected to mapping:
$this->assertRedirectedToRoute('csv.map'); $this->assertRedirectedToRoute('csv.map');
@@ -118,9 +118,9 @@ class CsvControllerTest extends TestCase
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('POST', '/csv/initial_parse', $postData); $this->call('POST', '/csv/initial_parse', $postData);
// should be redirect // should be redirect
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
// should be redirected to download config: // should be redirected to download config:
$this->assertRedirectedToRoute('csv.download-config-page'); $this->assertRedirectedToRoute('csv.download-config-page');
@@ -135,8 +135,8 @@ class CsvControllerTest extends TestCase
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('GET', '/csv/map'); $this->call('GET', '/csv/map');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
@@ -147,8 +147,8 @@ class CsvControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$this->session($this->getSessionData()); $this->session($this->getSessionData());
$response = $this->call('GET', '/csv/process'); $this->call('GET', '/csv/process');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -175,9 +175,9 @@ class CsvControllerTest extends TestCase
'NL81LEJP9477634344' => '0', 'NL14JYVJ1041891180' => '0', 'NL57SPBS0788124528' => '0', 'NL81LEJP9477634344' => '0', 'NL14JYVJ1041891180' => '0', 'NL57SPBS0788124528' => '0',
'NL96DZCO4665940223' => '2',],],]; 'NL96DZCO4665940223' => '2',],],];
$response = $this->call('POST', '/csv/save_mapping', $postData); $this->call('POST', '/csv/save_mapping', $postData);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertRedirectedToRoute('csv.download-config-page'); $this->assertRedirectedToRoute('csv.download-config-page');
} }
@@ -195,7 +195,7 @@ class CsvControllerTest extends TestCase
'csv_import_account' => 1, 'csv_import_account' => 1,
]; ];
$response = $this->call('POST', '/csv/upload', $args, [], ['csv' => $file]); $this->call('POST', '/csv/upload', $args, [], ['csv' => $file]);
// csv data set: // csv data set:
//$this->assertSessionHas('csv-file', 'abc'); //$this->assertSessionHas('csv-file', 'abc');
@@ -208,7 +208,7 @@ class CsvControllerTest extends TestCase
$this->assertSessionHas('csv-import-account', 1); $this->assertSessionHas('csv-import-account', 1);
$this->assertSessionHas('csv-delimiter', ','); $this->assertSessionHas('csv-delimiter', ',');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**

View File

@@ -20,8 +20,8 @@ class CurrencyControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/currency/create'); $this->call('GET', '/currency/create');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -30,8 +30,8 @@ class CurrencyControllerTest extends TestCase
public function testDefaultCurrency() public function testDefaultCurrency()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/currency/default/2'); $this->call('GET', '/currency/default/2');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertRedirectedToRoute('currency.index'); $this->assertRedirectedToRoute('currency.index');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
} }
@@ -42,8 +42,8 @@ class CurrencyControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/currency/delete/2'); $this->call('GET', '/currency/delete/2');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -53,10 +53,10 @@ class CurrencyControllerTest extends TestCase
{ {
$this->session(['currency.delete.url' => 'http://localhost/currency']); $this->session(['currency.delete.url' => 'http://localhost/currency']);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/currency/destroy/3'); $this->call('POST', '/currency/destroy/3');
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertRedirectedToRoute('currency.index'); $this->assertRedirectedToRoute('currency.index');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -65,8 +65,8 @@ class CurrencyControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/currency/edit/2'); $this->call('GET', '/currency/edit/2');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
@@ -76,8 +76,8 @@ class CurrencyControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/currency'); $this->call('GET', '/currency');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -93,8 +93,8 @@ class CurrencyControllerTest extends TestCase
'code' => 'IUY', 'code' => 'IUY',
]; ];
$response = $this->call('POST', '/currency/store', $args); $this->call('POST', '/currency/store', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertRedirectedToRoute('currency.index'); $this->assertRedirectedToRoute('currency.index');
} }
@@ -114,8 +114,8 @@ class CurrencyControllerTest extends TestCase
]; ];
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/currency/update/1', $args); $this->call('POST', '/currency/update/1', $args);
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertRedirectedToRoute('currency.index'); $this->assertRedirectedToRoute('currency.index');

View File

@@ -20,9 +20,9 @@ class HelpControllerTest extends TestCase
public function testShow() public function testShow()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/help/index'); $this->call('GET', '/help/index');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -31,8 +31,8 @@ class HelpControllerTest extends TestCase
public function testShowNoRoute() public function testShowNoRoute()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/help/indxxex'); $this->call('GET', '/help/indxxex');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -23,8 +23,8 @@ class HomeControllerTest extends TestCase
]; ];
// if date range is > 50, should have flash. // if date range is > 50, should have flash.
$response = $this->call('POST', '/daterange', $args); $this->call('POST', '/daterange', $args);
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
$this->assertSessionHas('warning', '91 days of data may take a while to load.'); $this->assertSessionHas('warning', '91 days of data may take a while to load.');
} }
@@ -34,8 +34,8 @@ class HomeControllerTest extends TestCase
public function testFlush() public function testFlush()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/flush'); $this->call('GET', '/flush');
$this->assertEquals(302, $response->status()); $this->assertResponseStatus(302);
} }
/** /**
@@ -45,7 +45,7 @@ class HomeControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/'); $this->call('GET', '/');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }

View File

@@ -21,8 +21,8 @@ class JsonControllerTest extends TestCase
public function testAction() public function testAction()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/action'); $this->call('GET', '/json/action');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -31,8 +31,8 @@ class JsonControllerTest extends TestCase
public function testBoxBillsPaid() public function testBoxBillsPaid()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/box/bills-paid'); $this->call('GET', '/json/box/bills-paid');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -41,8 +41,8 @@ class JsonControllerTest extends TestCase
public function testBoxBillsUnpaid() public function testBoxBillsUnpaid()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/box/bills-unpaid'); $this->call('GET', '/json/box/bills-unpaid');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -51,8 +51,8 @@ class JsonControllerTest extends TestCase
public function testBoxIn() public function testBoxIn()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/box/in'); $this->call('GET', '/json/box/in');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -61,8 +61,8 @@ class JsonControllerTest extends TestCase
public function testBoxOut() public function testBoxOut()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/box/out'); $this->call('GET', '/json/box/out');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -71,8 +71,8 @@ class JsonControllerTest extends TestCase
public function testCategories() public function testCategories()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/categories'); $this->call('GET', '/json/categories');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -82,7 +82,7 @@ class JsonControllerTest extends TestCase
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('POST', '/json/end-tour'); $response = $this->call('POST', '/json/end-tour');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
$this->assertEquals('"true"', $response->content()); $this->assertEquals('"true"', $response->content());
} }
@@ -92,8 +92,8 @@ class JsonControllerTest extends TestCase
public function testExpenseAccounts() public function testExpenseAccounts()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/expense-accounts'); $this->call('GET', '/json/expense-accounts');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -102,8 +102,8 @@ class JsonControllerTest extends TestCase
public function testRevenueAccounts() public function testRevenueAccounts()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/revenue-accounts'); $this->call('GET', '/json/revenue-accounts');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -112,8 +112,8 @@ class JsonControllerTest extends TestCase
public function testTags() public function testTags()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/tags'); $this->call('GET', '/json/tags');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -122,8 +122,8 @@ class JsonControllerTest extends TestCase
public function testTour() public function testTour()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/tour'); $this->call('GET', '/json/tour');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -138,8 +138,8 @@ class JsonControllerTest extends TestCase
$repository->shouldReceive('getJournalsOfType')->with($type)->once()->andReturn(new Collection); $repository->shouldReceive('getJournalsOfType')->with($type)->once()->andReturn(new Collection);
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/transaction-journals/deposit'); $this->call('GET', '/json/transaction-journals/deposit');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
/** /**
@@ -148,7 +148,7 @@ class JsonControllerTest extends TestCase
public function testTrigger() public function testTrigger()
{ {
$this->be($this->user()); $this->be($this->user());
$response = $this->call('GET', '/json/trigger'); $this->call('GET', '/json/trigger');
$this->assertEquals(200, $response->status()); $this->assertResponseStatus(200);
} }
} }