From 50e4848e465658a7b7b98df31574f2ff372a46eb Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sun, 26 Jan 2020 17:44:10 +0000 Subject: [PATCH] Fix tests to reflect updated code --- tests/Feature/SwarmTest.php | 2 +- tests/Unit/ArticlesTest.php | 7 ++----- tests/Unit/NotesTest.php | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/Feature/SwarmTest.php b/tests/Feature/SwarmTest.php index ad4c5530..e2b9ce55 100644 --- a/tests/Feature/SwarmTest.php +++ b/tests/Feature/SwarmTest.php @@ -152,7 +152,7 @@ class SwarmTest extends TestCase $this->assertDatabaseHas('notes', [ 'swarm_url' => 'https://www.swarmapp.com/checkin/def' ]); - $this->get($response->__get('headers')->get('location'))->assertSee('round pushpin'); + $this->get($response->__get('headers')->get('location'))->assertSee('📍'); } public function test_faked_ownyourswarm_request_saves_just_post_when_error_in_checkin_data() diff --git a/tests/Unit/ArticlesTest.php b/tests/Unit/ArticlesTest.php index d4cf13d3..8a38531e 100644 --- a/tests/Unit/ArticlesTest.php +++ b/tests/Unit/ArticlesTest.php @@ -60,11 +60,8 @@ class ArticlesTest extends TestCase $yearAndMonth = Article::date(date('Y'), date('m'))->get(); $this->assertTrue(count($yearAndMonth) === 1); - $monthDecember = Article::date(date('Y') - 1, 12)->get(); - $this->assertTrue(count($monthDecember) === 0); - - $monthNotDecember = Article::date(date('Y') - 1, 1)->get(); - $this->assertTrue(count($monthNotDecember) === 0); + $priorYear = Article::date(date('Y') - 1, 1)->get(); + $this->assertTrue(count($priorYear) === 0); $emptyScope = Article::date()->get(); $this->assertTrue(count($emptyScope) === 2); diff --git a/tests/Unit/NotesTest.php b/tests/Unit/NotesTest.php index cb6c5b72..a4a390d9 100644 --- a/tests/Unit/NotesTest.php +++ b/tests/Unit/NotesTest.php @@ -22,7 +22,7 @@ class NotesTest extends TestCase */ public function test_get_note_attribute_method() { - $expected = '

Having a at the local. 🍺

' . PHP_EOL; + $expected = '

Having a at the local. 🍺

' . PHP_EOL; $note = Note::find(2); $this->assertEquals($expected, $note->note); }