Files
firefly-iii/tests/acceptance/Controllers/JsonControllerTest.php

159 lines
4.0 KiB
PHP
Raw Normal View History

2016-11-19 20:30:30 +01:00
<?php
2016-12-06 09:16:36 +01:00
/**
* JsonControllerTest.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.
*/
2016-11-19 20:30:30 +01:00
/**
2016-12-10 06:54:50 +01:00
* Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:42.
2016-11-19 20:30:30 +01:00
*/
class JsonControllerTest extends TestCase
{
2016-11-20 07:24:18 +01:00
2016-11-19 20:30:30 +01:00
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
public function setUp()
{
2016-11-20 08:30:25 +01:00
parent::setUp();
2016-11-19 20:30:30 +01:00
}
2016-12-07 19:53:41 +01:00
/**
* @covers \FireflyIII\Http\Controllers\JsonController::action
2016-11-19 20:30:30 +01:00
*/
public function testAction()
{
$this->be($this->user());
$this->call('get', route('json.action'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::boxBillsPaid
2016-11-19 20:30:30 +01:00
*/
public function testBoxBillsPaid()
{
$this->be($this->user());
$this->call('get', route('json.box.paid'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
2016-11-19 20:30:30 +01:00
*/
public function testBoxBillsUnpaid()
{
$this->be($this->user());
$this->call('get', route('json.box.unpaid'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::boxIn
2016-11-19 20:30:30 +01:00
*/
public function testBoxIn()
{
$this->be($this->user());
$this->call('get', route('json.box.in'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::boxOut
2016-11-19 20:30:30 +01:00
*/
public function testBoxOut()
{
$this->be($this->user());
$this->call('get', route('json.box.out'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::categories
2016-11-19 20:30:30 +01:00
*/
public function testCategories()
{
$this->be($this->user());
$this->call('get', route('json.categories'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::endTour
2016-11-19 20:30:30 +01:00
*/
public function testEndTour()
{
$this->be($this->user());
$this->call('post', route('json.end-tour'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::expenseAccounts
2016-11-19 20:30:30 +01:00
*/
public function testExpenseAccounts()
{
$this->be($this->user());
$this->call('get', route('json.expense-accounts'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::revenueAccounts
2016-11-19 20:30:30 +01:00
*/
public function testRevenueAccounts()
{
$this->be($this->user());
$this->call('get', route('json.revenue-accounts'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::tags
2016-11-19 20:30:30 +01:00
*/
public function testTags()
{
$this->be($this->user());
$this->call('get', route('json.tags'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::tour
2016-11-19 20:30:30 +01:00
*/
public function testTour()
{
$this->be($this->user());
$this->call('get', route('json.tour'));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::transactionJournals
2016-11-19 20:30:30 +01:00
*/
public function testTransactionJournals()
{
$this->be($this->user());
$this->call('get', route('json.transaction-journals', ['deposit']));
$this->assertResponseStatus(200);
2016-11-19 20:30:30 +01:00
}
/**
2016-12-07 19:53:41 +01:00
* @covers \FireflyIII\Http\Controllers\JsonController::trigger
2016-11-19 20:30:30 +01:00
*/
public function testTrigger()
{
$this->be($this->user());
$this->call('get', route('json.trigger'));
$this->assertResponseStatus(200);
2016-12-10 06:54:50 +01:00
}
2016-11-19 20:30:30 +01:00
}