Files
firefly-iii/tests/acceptance/Controllers/Admin/DomainControllerTest.php
James Cole da3988cc63 New tests
2016-12-07 20:06:06 +01:00

77 lines
1.9 KiB
PHP

<?php
/**
* DomainControllerTest.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
namespace Admin;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31.
*/
class DomainControllerTest extends TestCase
{
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
public function setUp()
{
parent::setUp();
}
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::domains
* Implement testDomains().
*/
public function testDomains()
{
$this->be($this->user());
$this->call('GET', route('admin.users.domains'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::manual
* Implement testManual().
*/
public function testManual()
{
$this->be($this->user());
$this->call('POST', route('admin.users.domains.manual'), ['domain' => 'example2.com']);
$this->assertSessionHas('success');
$this->assertResponseStatus(302);
}
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain
* Implement testToggleDomain().
*/
public function testToggleDomain()
{
$this->be($this->user());
$this->call('GET', route('admin.users.domains.block-toggle', ['example.com']));
$this->assertSessionHas('message');
$this->assertResponseStatus(302);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}