mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Improve test coverage.
This commit is contained in:
@@ -93,7 +93,7 @@ class SingleControllerTest extends TestCase
|
||||
$repository->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$repository->shouldReceive('delete')->once();
|
||||
|
||||
$this->session(['transactions.delete.url' => 'http://localhost']);
|
||||
$this->session(['transactions.delete.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
$withdrawal = TransactionJournal::where('transaction_type_id', 1)->whereNull('deleted_at')->where('user_id', $this->user()->id)->first();
|
||||
$response = $this->post(route('transactions.destroy', [$withdrawal->id]));
|
||||
@@ -198,7 +198,7 @@ class SingleControllerTest extends TestCase
|
||||
$journal->description = 'New journal';
|
||||
$repository->shouldReceive('store')->andReturn($journal);
|
||||
$repository->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$this->session(['transactions.create.url' => 'http://localhost']);
|
||||
$this->session(['transactions.create.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
|
||||
$data = [
|
||||
@@ -242,7 +242,7 @@ class SingleControllerTest extends TestCase
|
||||
$attachmentRepo->shouldReceive('getMessages')->andReturn($messages);
|
||||
|
||||
|
||||
$this->session(['transactions.create.url' => 'http://localhost']);
|
||||
$this->session(['transactions.create.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
|
||||
$data = [
|
||||
@@ -281,7 +281,7 @@ class SingleControllerTest extends TestCase
|
||||
$repository->shouldReceive('update')->andReturn($journal);
|
||||
$repository->shouldReceive('first')->times(2)->andReturn(new TransactionJournal);
|
||||
|
||||
$this->session(['transactions.edit.url' => 'http://localhost']);
|
||||
$this->session(['transactions.edit.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
$data = [
|
||||
'id' => 123,
|
||||
|
Reference in New Issue
Block a user