mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Code cleanup.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature\Controllers;
|
||||
@@ -34,14 +33,12 @@ use Tests\TestCase;
|
||||
/**
|
||||
* Class CurrencyControllerTest
|
||||
*
|
||||
* @package Tests\Feature\Controllers
|
||||
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
||||
*/
|
||||
class CurrencyControllerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\CurrencyController::create
|
||||
*/
|
||||
@@ -73,7 +70,6 @@ class CurrencyControllerTest extends TestCase
|
||||
$repository->shouldReceive('canDeleteCurrency')->andReturn(false);
|
||||
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('currencies.delete', [2]));
|
||||
$response->assertStatus(302);
|
||||
@@ -95,7 +91,6 @@ class CurrencyControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
|
||||
|
||||
|
||||
$this->session(['currencies.delete.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('currencies.destroy', [1]));
|
||||
@@ -174,7 +169,6 @@ class CurrencyControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
|
||||
|
||||
|
||||
$this->session(['currencies.delete.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('currencies.destroy', [1]));
|
||||
@@ -328,5 +322,4 @@ class CurrencyControllerTest extends TestCase
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user