Disable all kinds of tests until upgrades are complete.

This commit is contained in:
James Cole
2019-04-09 15:32:48 +02:00
parent 63070bffc3
commit 97726c3822
114 changed files with 1581 additions and 1205 deletions

View File

@@ -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
*/