diff --git a/packages/ember/tests/routing/router_service_test/urlFor_test.js b/packages/ember/tests/routing/router_service_test/urlFor_test.js index 7eef0f561d8..e8d73b6d051 100644 --- a/packages/ember/tests/routing/router_service_test/urlFor_test.js +++ b/packages/ember/tests/routing/router_service_test/urlFor_test.js @@ -113,6 +113,26 @@ moduleFor( }); } + ['@test RouterService#urlFor returns URL for simple route with nested object as query params'](assert) { + assert.expect(1); + + let queryParams = this.buildQueryParams({ + filter: { + user: { + name: { + $contains: 'foo', + }, + }, + }, + }); + + return this.visit('/').then(() => { + let expectedURL = this.routerService.urlFor('parent.child', queryParams); + + assert.equal('/child?filter=[user][name][$contains]=foo', expectedURL); + }); + } + ['@test RouterService#urlFor returns URL for simple route with null query params'](assert) { assert.expect(1);