jonnybarnes.uk/tests/Browser/MicropubClientTest.php

34 lines
897 B
PHP
Raw Normal View History

2017-02-19 00:50:27 +00:00
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class MicropubClientTest extends DuskTestCase
{
/**
* Test the client is shown for an unauthorised request.
*
* @return void
*/
2017-02-20 16:41:47 +00:00
public function test_client_page_see_authenticated()
2017-02-19 00:50:27 +00:00
{
$this->browse(function ($browser) {
$browser->visit('/micropub/create')
2017-02-20 16:41:47 +00:00
->assertSee('You are authenticated');
2017-02-19 00:50:27 +00:00
});
}
public function test_client_page_updates_syndication()
2017-02-19 00:50:27 +00:00
{
$this->browse(function ($browser) {
2017-02-22 17:41:59 +00:00
$browser->visit(route('micropub-client'))
->assertDontSee('jonnybarnes on Twitter')
->clickLink('Refresh Syndication Targets')
->pause(5000)
->assertSee('jonnybarnes on Twitter');
2017-02-19 00:50:27 +00:00
});
}
}