public function test_a_post_can_be_deleted() { // Create new post $post = $this->createPostData(); $post->save(); $this->assertTrue(\Easel\Models\Post::count() === 1); // Delete it! $this->actingAs($this->user)->delete('admin/post/' . $post->id); // Is It There? $this->assertTrue(\Easel\Models\Post::count() === 0); $this->assertSessionHas('_delete-post', trans('easel::messages.delete_success', ['entity' => 'Post'])); $this->assertRedirectedTo('/admin/post'); }