jonnybarnes.uk/tests/Feature/BridgyPosseTest.php

31 lines
681 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 Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class BridgyPosseTest extends TestCase
{
use RefreshDatabase;
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();
2022-07-08 16:37:38 +01:00
$this->assertStringContainsString('Hi @joe__', $html);
}
}