I want to test back() function in laravel but I am not sure how to do that .
For e.g
public function destroy($id)
{
$query = Query::findorfail($id);
$query->delete();
return back()->with('success','Query deleted successfully');
}
In the above method the url is redirected back . But Can I create a test so that I can assert back()
Aucun commentaire:
Enregistrer un commentaire