jonnybarnes.uk/tests/NotesAdminTest.php
Jonny Barnes 0a07811311 Squashed commit of the following:
commit 70d23bbd8fbdbeb3b6554e42ac4283396372f39d
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Fri Feb 3 21:40:55 2017 +0000

    Updade to Laravel 5.4
2017-02-03 21:49:49 +00:00

33 lines
873 B
PHP

<?php
namespace App\Tests;
use BrowserKitTest;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class NotesAdminTest extends BrowserKitTest
{
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');
}
}