/**
  * @test
  */
 public function it_removes_the_business_service()
 {
     $this->arrangeBusinessWithOwner();
     $service = $this->makeService();
     $this->business->services()->save($service);
     $this->assertCount(1, $this->business->fresh()->services);
     $this->actingAs($this->owner);
     $this->call('DELETE', route('manager.business.service.destroy', ['business' => $this->business, 'service' => $service]));
     $this->assertCount(0, $this->business->fresh()->services);
 }
    /**
     * @test
     */
    public function it_updates_the_vacancy_in_advanced_mode()
    {
        $this->arrangeBusinessWithOwner();
        $serviceFour = $this->createService();
        $serviceFive = $this->createService();
        $serviceSix = $this->createService();
        $this->business->services()->save($serviceFour);
        $this->business->services()->save($serviceFive);
        $this->business->services()->save($serviceSix);
        $this->actingAs($this->owner);
        $this->visit(route('manager.business.vacancy.create', $this->business));
        $vacanciesCountBeforeUpdate = $this->business->vacancies->count();
        $newCapacity = 2;
        $sheet = <<<EOD
{$serviceFour->slug}:{$newCapacity}
 mon, tue, thu
  9 - 14, 15:30 - 18:30
EOD;
        $this->type($sheet, 'vacancies');
        $this->press('Update');
        $this->assertCount($vacanciesCountBeforeUpdate + 6, $this->business->fresh()->vacancies);
    }