Skip to content

Commit a0248d9

Browse files
committed
remove test for front end only defaults
1 parent 88060cc commit a0248d9

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

tests/DefaultParameters.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { expect, test } from "vitest";
22
import {
33
defaultParametersDomain,
4-
dynamicDomain,
54
fixedDomain,
65
} from "../workbench/resources/js/actions/App/Http/Controllers/DomainController";
76
import { setUrlDefaults } from "../workbench/resources/js/wayfinder";
@@ -12,18 +11,6 @@ test("it can generate urls without default parameters set", () => {
1211
);
1312
});
1413

15-
test("it can generate urls with default parameters set on frontend", () => {
16-
setUrlDefaults({
17-
domain: "tim.macdonald",
18-
});
19-
20-
expect(
21-
dynamicDomain.url({
22-
param: "foo",
23-
}),
24-
).toBe("//tim.macdonald.au/dynamic-domain/foo");
25-
});
26-
2714
test("it can generate urls with default URL parameters set on backend and frontend", () => {
2815
setUrlDefaults({
2916
defaultDomain: "tim.macdonald",

workbench/app/Http/Controllers/DomainController.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ public function fixedDomain()
99
//
1010
}
1111

12-
public function dynamicDomain()
13-
{
14-
//
15-
}
16-
1712
public function defaultParametersDomain()
1813
{
1914
//

workbench/routes/web.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
Route::get('/parameter-names/{SCREAMING_SNAKE_CASE}/screaming-snake', [ParameterNameController::class, 'screamingSnake']);
5959

6060
Route::domain('example.test')->get('/fixed-domain/{param}', [DomainController::class, 'fixedDomain']);
61-
Route::domain('{domain}.au')->get('/dynamic-domain/{param}', [DomainController::class, 'dynamicDomain']);
6261
Route::domain('{defaultDomain}.au')->get('/default-parameters-domain/{param}', [DomainController::class, 'defaultParametersDomain']);
6362

6463
Route::get('/nested/controller', [NestedController::class, 'nested']);

0 commit comments

Comments
 (0)