mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 00:20:03 +00:00
Remove tests.
This commit is contained in:
@@ -1,120 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* RuleGroupControllerTest.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:29.
|
||||
*/
|
||||
class RuleGroupControllerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::create
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::__construct
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/rule-groups/create');
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/rule-groups/delete/1');
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$this->session(['rules.rule-group.delete.url' => 'http://localhost']);
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('POST', '/rule-groups/destroy/1');
|
||||
$this->assertResponseStatus(302);
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::down
|
||||
*/
|
||||
public function testDown()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/rule-groups/down/1');
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/rule-groups/edit/1');
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::store
|
||||
* @covers FireflyIII\Http\Requests\RuleGroupFormRequest::authorize
|
||||
* @covers FireflyIII\Http\Requests\RuleGroupFormRequest::rules
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
$this->session(['rules.rule-group.create.url' => 'http://localhost']);
|
||||
$args = [
|
||||
'title' => 'Some new rule group',
|
||||
'description' => 'New rules',
|
||||
];
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('POST', '/rule-groups/store', $args);
|
||||
$this->assertResponseStatus(302);
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::up
|
||||
*/
|
||||
public function testUp()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/rule-groups/up/1');
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\RuleGroupController::update
|
||||
* @covers FireflyIII\Http\Requests\RuleGroupFormRequest::authorize
|
||||
* @covers FireflyIII\Http\Requests\RuleGroupFormRequest::rules
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
$this->session(['rules.rule-group.edit.url' => 'http://localhost']);
|
||||
$args = [
|
||||
'id' => 1,
|
||||
'title' => 'Some new rule group X',
|
||||
'description' => 'New rules',
|
||||
'active' => 1,
|
||||
];
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('POST', '/rule-groups/update/1', $args);
|
||||
$this->assertResponseStatus(302);
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user