1
0
Fork 0
mirror of https://github.com/archtechx/laravel-pages.git synced 2025-12-12 01:44:03 +00:00

Use please() in tests

This commit is contained in:
Samuel Štancl 2021-08-13 19:55:22 +02:00
parent 154f22a573
commit 56802a668e
4 changed files with 14 additions and 13 deletions

View file

@ -28,7 +28,7 @@ test('markdown is rendered if it exists', function () {
'content' => 'This is a **test page**'
]);
using($this)
please()
->get('/test')
->assertSee('Markdown page')
->assertSee('<strong>test page</strong>', false);
@ -41,7 +41,7 @@ test('view takes precedence over markdown', function () {
'content' => 'This is a test page'
]);
using($this)
please()
->get('/example')
->assertSee('Test view')
->assertDontSee('Test page');
@ -60,7 +60,7 @@ test('a custom layout can be used', function () {
'content' => 'This is a test page'
]);
using($this)
please()
->get('/test')
->assertSee('second layout');
});
@ -72,7 +72,7 @@ test('SEO metadata is set on markdown pages', function () {
'content' => 'This is a test page'
]);
using($this)
please()
->get('/test')
->assertSee('<meta property="og:title" content="Test page" />', false)
->assertSee('<meta property="og:description" content="This is a test page" />', false);
@ -86,7 +86,7 @@ test('pages can be password-protected', function () {
'content' => 'This is a test page'
]);
using($this)->get('/test')->assertForbidden();
using($this)->get('/test?password=bar')->assertForbidden();
using($this)->get('/test?password=foo')->assertSuccessful()->assertSee('This is a test page');
please()->get('/test')->assertForbidden();
please()->get('/test?password=bar')->assertForbidden();
please()->get('/test?password=foo')->assertSuccessful()->assertSee('This is a test page');
});