diff --git a/resources/views/site/help/community-guidelines.blade.php b/resources/views/site/help/community-guidelines.blade.php index ba359733d..72b015d69 100644 --- a/resources/views/site/help/community-guidelines.blade.php +++ b/resources/views/site/help/community-guidelines.blade.php @@ -8,9 +8,9 @@
@if($page)
- {!!$page->content!!} + {!!$page['content']!!}
-

This document was last updated {{$page->created_at->format('M d, Y')}}.

+

This document was last updated {{$page['created_at']}}.

@else
diff --git a/resources/views/site/privacy.blade.php b/resources/views/site/privacy.blade.php index 15a0f8857..e92a4efd1 100644 --- a/resources/views/site/privacy.blade.php +++ b/resources/views/site/privacy.blade.php @@ -4,8 +4,8 @@

- @if($page && $page->title) - {!! $page->title !!} + @if($page && $page['title']) + {!! $page['title'] !!} @else Privacy Policy @endif @@ -97,5 +97,5 @@

@endsection @push('meta') - + @endpush diff --git a/resources/views/site/terms.blade.php b/resources/views/site/terms.blade.php index 8628c0d94..81cc3115a 100644 --- a/resources/views/site/terms.blade.php +++ b/resources/views/site/terms.blade.php @@ -4,8 +4,8 @@

- @if($page && $page->title) - {!! $page->title !!} + @if($page && $page['title']) + {!! $page['title'] !!} @else Terms of Use @endif @@ -57,5 +57,5 @@ @endsection @push('meta') - + @endpush diff --git a/tests/Feature/Api/AccountTest.php b/tests/Feature/Api/AccountTest.php index 53168cc2a..175d644c9 100644 --- a/tests/Feature/Api/AccountTest.php +++ b/tests/Feature/Api/AccountTest.php @@ -167,7 +167,11 @@ describe('scope enforcement on writes', function () { describe('first-party session auth', function () { it('allows writes without a token', function () { - config(['sanctum.stateful' => ['pixelfed.test']]); + // Derive the stateful domain from app.url so the Origin header and the + // sanctum.stateful entry always match, regardless of the environment's + // configured APP_URL (e.g. pixelfed.test in CI vs a local dev domain). + $host = parse_url(config('app.url'), PHP_URL_HOST); + config(['sanctum.stateful' => [$host]]); $user = User::factory()->create(); $user->refresh(); $status = Status::factory()->create([ diff --git a/tests/Feature/CriticalRoutes/PublicRouteSmokeTest.php b/tests/Feature/CriticalRoutes/PublicRouteSmokeTest.php index 3884649d5..2d8354227 100644 --- a/tests/Feature/CriticalRoutes/PublicRouteSmokeTest.php +++ b/tests/Feature/CriticalRoutes/PublicRouteSmokeTest.php @@ -44,6 +44,10 @@ describe('routes that require database', function () { uses(LazilyRefreshDatabase::class); test('register page loads', function () { + // The register form 404s when open registration is disabled (the + // default), so enable it for this smoke test. + config(['pixelfed.open_registration' => true]); + $this->get('/register') ->assertStatus(200); });