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