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
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-02-23 09:15:25 +00:00
|
|
|
public function test_client_page_updates_syndication()
|
2017-02-19 00:50:27 +00:00
|
|
|
{
|
2017-02-23 09:22:23 +00:00
|
|
|
$this->browse(function ($browser) {
|
2017-02-22 17:41:59 +00:00
|
|
|
$browser->visit(route('micropub-client'))
|
2017-02-23 18:25:52 +00:00
|
|
|
->assertDontSee('jonnybarnes on Twitter')
|
2017-02-23 09:15:25 +00:00
|
|
|
->clickLink('Refresh Syndication Targets')
|
2017-02-24 11:28:52 +00:00
|
|
|
->pause(5000)
|
2017-02-23 18:25:52 +00:00
|
|
|
->assertSee('jonnybarnes on Twitter');
|
2017-02-19 00:50:27 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|