Fix a couple of tests

This commit is contained in:
Jonny Barnes 2018-01-06 21:14:13 +00:00
parent 53875f08eb
commit 499674599b
3 changed files with 3 additions and 3 deletions

View file

@ -31,7 +31,7 @@ class ArticlesController extends Controller
{
$article = Article::where('titleurl', $slug)->firstOrFail();
if ($article->updated_at->year != $year || $article->updated_at->month != $month) {
return redirect('/blog/' . $article->updated_at->year . '/' . $article->updated_at->month .'/' . $slug);
return redirect('/blog/' . $article->updated_at->year . '/' . $article->updated_at->format('m') .'/' . $slug);
}
return view('articles.show', compact('article'));

View file

@ -11,7 +11,7 @@ class MicropbClientsTest extends TestCase
{
public function test_notes_relationship()
{
$client = MicropubClient::find(3);
$client = MicropubClient::find(1);
$this->assertInstanceOf(Collection::class, $client->notes);
}
}

View file

@ -15,7 +15,7 @@ class TagsTest extends TestCase
public function test_bookmarks_method()
{
$tag = Tag::find(4); //should be first random tag for bookmarks
$tag = Tag::find(5); //should be first random tag for bookmarks
$this->assertEquals(1, count($tag->bookmarks));
}
}