Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow routing to apps installed in subfolders #302

Merged
merged 8 commits into from
Jun 26, 2020
Prev Previous commit
Next Next commit
Fix tests to set href explicitly
  • Loading branch information
bakerkretzmar committed Jun 12, 2020
commit b438ae993fc7ca238e9a5699959d8f3a04bbd1a1
3 changes: 3 additions & 0 deletions tests/js/test.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,16 +870,19 @@ describe('route()', function() {
});

it('Should combine dynamic params from the domain and the URI', function() {
global.window.location.href = 'http://tighten.myapp.dev/users/1';
global.window.location.hostname = 'tighten.myapp.dev';
global.window.location.pathname = '/users/1';

assert.deepStrictEqual(route().params, { team: 'tighten', id: '1' });

global.window.location.href = 'http://' + global.Ziggy.baseDomain + '/posts/1';
global.window.location.hostname = global.Ziggy.baseDomain;
global.window.location.pathname = '/posts/1';

assert.deepStrictEqual(route().params, { post: '1' });

global.window.location.href = 'http://myapp.dev/events/1/venues/2';
global.window.location.pathname = '/events/1/venues/2';

assert.deepStrictEqual(route().params, { event: '1', venue: '2' });
Expand Down