Skip to content

Commit

Permalink
Merge pull request #463 from wachunei/tests/static-url-query-params
Browse files Browse the repository at this point in the history
Add Router#{url,path} query params feature test (#397)
  • Loading branch information
jbielick authored May 29, 2018
2 parents c0e9e08 + dc13b50 commit 32d5320
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/url.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ test('static - produces a path', t => {
t.is(path, '/users');
});

test('static - produces a path with query paramaters', t => {
const path = Router.path('/users', { role: 'admin', limit: '10' });

t.is(path, '/users?role=admin&limit=10');
});

test('static - produces a path with params', t => {
const path = Router.path('/users/:id/photos/:tag', { id: 1, tag: 'me' });

Expand Down

0 comments on commit 32d5320

Please sign in to comment.