jonnybarnes.uk/tests/Feature/BridgyPosseTest.php

28 lines
619 B
PHP
Raw Normal View History

<?php
2021-03-17 18:38:18 +00:00
declare(strict_types=1);
namespace Tests\Feature;
use App\Models\Contact;
use App\Models\Note;
use Tests\TestCase;
class BridgyPosseTest extends TestCase
{
2021-03-17 18:38:18 +00:00
/** @test */
public function notesWeWantCopiedToTwitterShouldHaveNecessaryMarkup(): void
{
Contact::factory()->create([
'nick' => 'joe',
'twitter' => 'joe__',
]);
$note = Note::factory()->create(['note' => 'Hi @joe']);
$response = $this->get($note->longurl);
$html = $response->content();
$this->assertStringContainsString('p-bridgy-twitter-content', $html);
}
}