32 lines
928 B
PHP
32 lines
928 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
it('news listing page loads', function () {
|
||
|
|
$this->visit(BASE_URL . '/nyheter')
|
||
|
|
->assertSourceHas('<main');
|
||
|
|
});
|
||
|
|
|
||
|
|
it('news listing shows article titles', function () {
|
||
|
|
$this->visit(BASE_URL . '/nyheter')
|
||
|
|
->assertSee('Banebrytende');
|
||
|
|
});
|
||
|
|
|
||
|
|
it('individual news article loads', function () {
|
||
|
|
$this->visit(BASE_URL . '/nyheter/2025-09-26-banebrytende-studie')
|
||
|
|
->assertSourceHas('<main');
|
||
|
|
});
|
||
|
|
|
||
|
|
it('individual news article shows content', function () {
|
||
|
|
$this->visit(BASE_URL . '/nyheter/2025-09-26-banebrytende-studie')
|
||
|
|
->assertSee('medisinsk cannabis');
|
||
|
|
});
|
||
|
|
|
||
|
|
it('news article about podcast loads', function () {
|
||
|
|
$this->visit(BASE_URL . '/nyheter/2026-03-08-podcast-paradigmepodden')
|
||
|
|
->assertSourceHas('<main');
|
||
|
|
});
|
||
|
|
|
||
|
|
it('returns 404 for non-existent news article', function () {
|
||
|
|
$this->visit(BASE_URL . '/nyheter/finnes-ikke')
|
||
|
|
->assertSourceHas('404');
|
||
|
|
});
|