Update kontoverbindung

This commit is contained in:
philipp lang 2022-02-11 01:56:02 +01:00
parent fb12ca760b
commit 2f8b71e3cf
2 changed files with 6 additions and 3 deletions

@ -1 +1 @@
Subproject commit b833537f32835adb881d873a924b56d63c61d327 Subproject commit 1f03a84eff994dbd0f9339a557830699ba454af5

View File

@ -13,6 +13,7 @@ use App\Nationality;
use App\Payment\Subscription; use App\Payment\Subscription;
use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
use Tests\TestCase; use Tests\TestCase;
use Zoomyboy\LaravelNami\Backend\FakeBackend; use Zoomyboy\LaravelNami\Backend\FakeBackend;
@ -60,7 +61,9 @@ class UpdateTest extends TestCase
->patch("/member/{$member->id}", array_merge($member->getAttributes(), ['has_nami' => true, 'firstname' => '::firstname::'])); ->patch("/member/{$member->id}", array_merge($member->getAttributes(), ['has_nami' => true, 'firstname' => '::firstname::']));
Http::assertSent(fn ($request) => $request->method() === 'PUT' Http::assertSent(fn ($request) => $request->method() === 'PUT'
&& $request['missingkey'] === 'missingvalue' && $request['vorname'] === '::firstname::' && $request['kontoverbindung'] === '{"a":"b"}'
&& $request['missingkey'] === 'missingvalue'
&& $request['vorname'] === '::firstname::'
); );
} }
@ -92,7 +95,7 @@ class UpdateTest extends TestCase
{ {
Http::fake(function ($request) { Http::fake(function ($request) {
if ($request->url() === app(FakeBackend::class)->singleMemberUrl(10, 135) && $request->method() === 'GET') { if ($request->url() === app(FakeBackend::class)->singleMemberUrl(10, 135) && $request->method() === 'GET') {
return Http::response('{ "success": true, "data": {"missingkey": "missingvalue"} }', 200); return Http::response('{ "success": true, "data": {"missingkey": "missingvalue", "kontoverbindung": {"a": "b"} } }', 200);
} }
if ($request->url() === app(FakeBackend::class)->singleMemberUrl(10, 135) && $request->method() === 'PUT') { if ($request->url() === app(FakeBackend::class)->singleMemberUrl(10, 135) && $request->method() === 'PUT') {