1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-06 00:04:03 +00:00
This commit is contained in:
Abrar Ahmad 2022-08-09 10:18:07 +05:00
parent db4a795c3e
commit 25f19c2c39
2 changed files with 26 additions and 2 deletions

View file

@ -18,7 +18,7 @@ beforeEach(function () {
], function () {
Route::get('/foo/{a}/{b}', function ($a, $b) {
return "$a + $b";
});
})->name('foo');
});
});
@ -123,3 +123,14 @@ test('tenant parameter name can be customized', function () {
->withoutExceptionHandling()
->get('/acme/foo/abc/xyz');
});
test('tenant path route helper function test', function () {
Tenant::create([
'id' => 'acme',
]);
pest()->get( tenant_path_route('foo', ['a' => 'a', 'b' => 'b']));
expect(tenancy()->initialized)->toBeTrue();
expect(tenant('id'))->toBe('acme');
});