Fix tests to reflect updated code

This commit is contained in:
Jonny Barnes 2020-01-26 17:44:10 +00:00
parent 3fe200ffab
commit 50e4848e46
3 changed files with 4 additions and 7 deletions

View file

@ -152,7 +152,7 @@ class SwarmTest extends TestCase
$this->assertDatabaseHas('notes', [ $this->assertDatabaseHas('notes', [
'swarm_url' => 'https://www.swarmapp.com/checkin/def' '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() public function test_faked_ownyourswarm_request_saves_just_post_when_error_in_checkin_data()

View file

@ -60,11 +60,8 @@ class ArticlesTest extends TestCase
$yearAndMonth = Article::date(date('Y'), date('m'))->get(); $yearAndMonth = Article::date(date('Y'), date('m'))->get();
$this->assertTrue(count($yearAndMonth) === 1); $this->assertTrue(count($yearAndMonth) === 1);
$monthDecember = Article::date(date('Y') - 1, 12)->get(); $priorYear = Article::date(date('Y') - 1, 1)->get();
$this->assertTrue(count($monthDecember) === 0); $this->assertTrue(count($priorYear) === 0);
$monthNotDecember = Article::date(date('Y') - 1, 1)->get();
$this->assertTrue(count($monthNotDecember) === 0);
$emptyScope = Article::date()->get(); $emptyScope = Article::date()->get();
$this->assertTrue(count($emptyScope) === 2); $this->assertTrue(count($emptyScope) === 2);

View file

@ -22,7 +22,7 @@ class NotesTest extends TestCase
*/ */
public function test_get_note_attribute_method() public function test_get_note_attribute_method()
{ {
$expected = '<p>Having a <a rel="tag" class="p-category" href="/notes/tagged/beer">#beer</a> at the local. <span role="img" aria-label="beer mug">🍺</span></p>' . PHP_EOL; $expected = '<p>Having a <a rel="tag" class="p-category" href="/notes/tagged/beer">#beer</a> at the local. 🍺</p>' . PHP_EOL;
$note = Note::find(2); $note = Note::find(2);
$this->assertEquals($expected, $note->note); $this->assertEquals($expected, $note->note);
} }