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

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