Have webmentions sent automatically
This commit is contained in:
parent
44060da577
commit
e31364e787
7 changed files with 49 additions and 11 deletions
33
tests/NotesAdminTest.php
Normal file
33
tests/NotesAdminTest.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Tests;
|
||||
|
||||
use TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class NotesAdminTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
protected $appurl;
|
||||
protected $notesAdminController;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->appurl = config('app.url');
|
||||
$this->notesAdminController = new \App\Http\Controllers\NotesAdminController();
|
||||
}
|
||||
|
||||
public function testCreatedNoteDispatchesSendWebmentionsJob()
|
||||
{
|
||||
$this->expectsJobs(\App\Jobs\SendWebMentions::class);
|
||||
|
||||
$this->withSession(['loggedin' => true])
|
||||
->visit($this->appurl . '/admin/note/new')
|
||||
->type('Mentioning', 'content')
|
||||
->press('Submit');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue