mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 00:04:03 +00:00
wip
This commit is contained in:
parent
db4a795c3e
commit
25f19c2c39
2 changed files with 26 additions and 2 deletions
|
|
@ -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');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue