Пример #1
0
 /**
  * @test
  */
 public function it_not_allows_update_page_to_a_frontpage()
 {
     // log in
     $adminUser = User::first();
     $this->actingAs($adminUser);
     // create a page without slug
     $this->visit('/backend/page/create')->type('WildWest', 'title')->type('wild', 'slug')->type('Soo cool', 'body')->press(trans('crud::crud.save'))->see('alert-success');
     // try to update this page without a slug
     $this->visit('/backend/page/2/edit')->type('Wildeast', 'title')->type('', 'slug')->type('Soo cool', 'body')->press(trans('crud::crud.save'))->see('alert-success');
     $page = Page::whereTitle('Wildeast')->firstOrFail();
     $this->assertEquals('wildeast', $page->slug);
 }