whisper-money/tests/Feature/OpenBanking/OpenBankingFeatureFlagTest.php

24 lines
698 B
PHP

<?php
test('guests cannot access institutions route', function () {
$this->getJson('/open-banking/institutions?country=ES')
->assertUnauthorized();
});
test('guests cannot access authorize route', function () {
$this->postJson('/open-banking/authorize', [
'aspsp_name' => 'Test Bank',
'country' => 'ES',
])->assertUnauthorized();
});
test('guests are redirected away from callback route', function () {
$this->get('/open-banking/callback?code=test')
->assertRedirect(route('login'));
});
test('guests are redirected away from connections index', function () {
$this->get('/settings/connections')
->assertRedirect(route('login'));
});