2016-06-23 14:27:00 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Tests;
|
|
|
|
|
2017-02-03 21:49:49 +00:00
|
|
|
use BrowserKitTest;
|
2016-06-23 14:27:00 +01:00
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
2017-02-03 21:49:49 +00:00
|
|
|
class NotesAdminTest extends BrowserKitTest
|
2016-06-23 14:27:00 +01:00
|
|
|
{
|
|
|
|
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');
|
|
|
|
}
|
|
|
|
}
|