33 lines
861 B
PHP
33 lines
861 B
PHP
<?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');
|
|
}
|
|
}
|