be($reminder->remindersable->account->user); $this->call('GET', '/reminder/act/' . $reminder->id); $this->assertResponseStatus(302); $this->assertRedirectedToRoute('transactions.create', ['transfer']); } public function testDismiss() { $reminder = FactoryMuffin::create('FireflyIII\Models\Reminder'); $this->be($reminder->remindersable->account->user); $this->call('GET', '/reminder/dismiss/' . $reminder->id); $this->assertResponseStatus(302); $this->assertRedirectedTo('/'); } public function testIndex() { $user = FactoryMuffin::create('FireflyIII\User'); $this->be($user); $reminder = FactoryMuffin::create('FireflyIII\Models\Reminder'); $collection = new Collection([$reminder]); $repository = $this->mock('FireflyIII\Repositories\Reminder\ReminderRepositoryInterface'); $repository->shouldReceive('getActiveReminders')->andReturn($collection); $repository->shouldReceive('getExpiredReminders')->andReturn($collection); $repository->shouldReceive('getInactiveReminders')->andReturn($collection); $repository->shouldReceive('getDismissedReminders')->andReturn($collection); $this->call('GET', '/reminders'); $this->assertResponseOk(); } public function testShow() { $reminder = FactoryMuffin::create('FireflyIII\Models\Reminder'); $reminder->notnow = false; $reminder->save(); $this->be($reminder->remindersable->account->user); $this->call('GET', '/reminder/' . $reminder->id); $this->assertResponseOk(); } public function testShowDismissed() { $reminder = FactoryMuffin::create('FireflyIII\Models\Reminder'); $reminder->notnow = true; $reminder->save(); $this->be($reminder->remindersable->account->user); $this->call('GET', '/reminder/' . $reminder->id); $this->assertResponseOk(); } }