Example #1
0
 public function test_active()
 {
     $default = factory(Task::class)->create(['completed' => null]);
     $active = factory(Task::class)->create(['completed' => false]);
     $inactive = factory(Task::class)->create(['completed' => true]);
     $tasks = Task::active()->lists('id');
     $this->assertContains($default->id, $tasks);
     $this->assertContains($active->id, $tasks);
     $this->assertNotContains($inactive->id, $tasks);
 }