be($this->user()); $this->call('GET', '/json/action'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid */ public function testBoxBillsPaid() { $this->be($this->user()); $this->call('GET', '/json/box/bills-paid'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid */ public function testBoxBillsUnpaid() { $this->be($this->user()); $this->call('GET', '/json/box/bills-unpaid'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::boxIn */ public function testBoxIn() { $this->be($this->user()); $this->call('GET', '/json/box/in'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::boxOut */ public function testBoxOut() { $this->be($this->user()); $this->call('GET', '/json/box/out'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::categories */ public function testCategories() { $this->be($this->user()); $this->call('GET', '/json/categories'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::endTour */ public function testEndTour() { $this->be($this->user()); $response = $this->call('POST', '/json/end-tour'); $this->assertResponseStatus(200); $this->assertEquals('"true"', $response->content()); } /** * @covers FireflyIII\Http\Controllers\JsonController::expenseAccounts */ public function testExpenseAccounts() { $this->be($this->user()); $this->call('GET', '/json/expense-accounts'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::revenueAccounts */ public function testRevenueAccounts() { $this->be($this->user()); $this->call('GET', '/json/revenue-accounts'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::tags */ public function testTags() { $this->be($this->user()); $this->call('GET', '/json/tags'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::tour */ public function testTour() { $this->be($this->user()); $this->call('GET', '/json/tour'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::transactionJournals */ public function testTransactionJournals() { $type = factory(FireflyIII\Models\TransactionType::class)->make(); $repository = $this->mock('FireflyIII\Repositories\Journal\JournalRepositoryInterface'); $repository->shouldReceive('getTransactionType')->with('deposit')->once()->andReturn($type); $repository->shouldReceive('getJournalsOfType')->with($type)->once()->andReturn(new Collection); $this->be($this->user()); $this->call('GET', '/json/transaction-journals/deposit'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\JsonController::trigger */ public function testTrigger() { $this->be($this->user()); $this->call('GET', '/json/trigger'); $this->assertResponseStatus(200); } }