/**
  * Partendo dallo slug di una serie, redireziona il lettore al primo articolo, pubblicato, della serie.
  *
  * @param SeriesRepository $seriesRepository
  * @param $slug
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
  */
 public function getSeriesFirstArticle(SeriesRepository $seriesRepository, $slug)
 {
     try {
         $series = $seriesRepository->findBySlug($slug, true);
         $firstArticle = $series->articles->first();
         return redirect('articoli/' . $series->slug . '/' . $firstArticle->slug);
     } catch (NotFoundException $e) {
         throw new NotFoundHttpException();
     }
 }
 /**
  * @expectedException \LaravelItalia\Exceptions\NotFoundException
  */
 public function testCanFindBySlugThrowsException2()
 {
     $this->saveTestSeries();
     $this->repository->findBySlug('title', true);
 }