Skip to content

Commit 9b612f9

Browse files
Add failing test for #16921
1 parent b20e345 commit 9b612f9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/ember/tests/routing/query_params_test.js

+26
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,32 @@ moduleFor(
629629
});
630630
}
631631

632+
['@test GH#16921 transitioning works if both model and query params are supplied and refreshModel is true'](assert) {
633+
assert.expect(2);
634+
635+
this.router.map(function() {
636+
this.route('target', { path: 'target/:target_id' });
637+
});
638+
639+
this.add(
640+
'route:target',
641+
Route.extend({
642+
queryParams: {
643+
param1: {
644+
refreshModel: true,
645+
},
646+
},
647+
model() {},
648+
})
649+
);
650+
651+
return this.visitAndAssert('/').then(() => {
652+
let model = { id: '123' };
653+
this.transitionTo('target', model, { queryParams: { param1: 'new_param_value' }});
654+
this.assertCurrentPath('/target/123?param1=new_param_value');
655+
});
656+
}
657+
632658
['@test multiple QP value changes only cause a single model refresh'](assert) {
633659
assert.expect(2);
634660

0 commit comments

Comments
 (0)