mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Disable all kinds of tests until upgrades are complete.
This commit is contained in:
@@ -212,6 +212,27 @@ class CurrencyControllerTest extends TestCase
|
||||
$response->assertStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\CurrencyController
|
||||
*/
|
||||
public function testDisableEnableFirst(): void
|
||||
{
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$currency = TransactionCurrency::first();
|
||||
|
||||
$userRepos->shouldReceive('hasRole')->atLeast()->once()->andReturn(true);
|
||||
$repository->shouldReceive('currencyInuse')->atLeast()->once()->andReturn(false);
|
||||
$repository->shouldReceive('disable')->atLeast()->once()->andReturn(false);
|
||||
$repository->shouldReceive('get')->atLeast()->once()->andReturn(new Collection);
|
||||
$repository->shouldReceive('getAll')->atLeast()->once()->andReturn(new Collection([$currency]));
|
||||
$repository->shouldReceive('enable')->atLeast()->once()->andReturn(true);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('currencies.disable', [$currency->id]));
|
||||
$response->assertStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\CurrencyController
|
||||
*/
|
||||
@@ -251,29 +272,6 @@ class CurrencyControllerTest extends TestCase
|
||||
$response->assertSee('No currencies found.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\CurrencyController
|
||||
*/
|
||||
public function testDisableEnableFirst(): void
|
||||
{
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$currency = TransactionCurrency::first();
|
||||
|
||||
$userRepos->shouldReceive('hasRole')->atLeast()->once()->andReturn(true);
|
||||
$repository->shouldReceive('currencyInuse')->atLeast()->once()->andReturn(false);
|
||||
$repository->shouldReceive('disable')->atLeast()->once()->andReturn(false);
|
||||
$repository->shouldReceive('get')->atLeast()->once()->andReturn(new Collection);
|
||||
$repository->shouldReceive('getAll')->atLeast()->once()->andReturn(new Collection([$currency]));
|
||||
$repository->shouldReceive('enable')->atLeast()->once()->andReturn(true);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('currencies.disable', [$currency->id]));
|
||||
$response->assertStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\CurrencyController
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user