mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Code cleanup and realign.
This commit is contained in:
@@ -108,23 +108,6 @@ class AutoCompleteControllerTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController
|
||||
*/
|
||||
public function testCurrencyNames(): void
|
||||
{
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
|
||||
$currency = TransactionCurrency::find(1);
|
||||
$repository->shouldReceive('get')->andReturn(new Collection([$currency]))->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('json.currency-names'));
|
||||
$response->assertStatus(200);
|
||||
$response->assertExactJson(['Euro']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController
|
||||
*/
|
||||
@@ -159,6 +142,22 @@ class AutoCompleteControllerTest extends TestCase
|
||||
$response->assertExactJson([$category->name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController
|
||||
*/
|
||||
public function testCurrencyNames(): void
|
||||
{
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
|
||||
$currency = TransactionCurrency::find(1);
|
||||
$repository->shouldReceive('get')->andReturn(new Collection([$currency]))->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('json.currency-names'));
|
||||
$response->assertStatus(200);
|
||||
$response->assertExactJson(['Euro']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user