From 499674599be37003507fc3f8383bf945929922a9 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sat, 6 Jan 2018 21:14:13 +0000 Subject: [PATCH] Fix a couple of tests --- app/Http/Controllers/ArticlesController.php | 2 +- tests/Unit/MicropbClientsTest.php | 2 +- tests/Unit/TagsTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ArticlesController.php b/app/Http/Controllers/ArticlesController.php index a778c5bc..9dd2f2db 100644 --- a/app/Http/Controllers/ArticlesController.php +++ b/app/Http/Controllers/ArticlesController.php @@ -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')); diff --git a/tests/Unit/MicropbClientsTest.php b/tests/Unit/MicropbClientsTest.php index 22f826bb..2de9ce96 100644 --- a/tests/Unit/MicropbClientsTest.php +++ b/tests/Unit/MicropbClientsTest.php @@ -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); } } diff --git a/tests/Unit/TagsTest.php b/tests/Unit/TagsTest.php index 79e2e1e5..a71cbde5 100644 --- a/tests/Unit/TagsTest.php +++ b/tests/Unit/TagsTest.php @@ -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)); } }