Commit caa6b3eb authored by Fernando's avatar Fernando

Remove stale unit tests

* Remove unit tests since function was removed
parent f19bf138
......@@ -889,22 +889,4 @@ describe('Api', () => {
});
});
});
describe('getApiPath', () => {
describe.each`
path | params | query | expected
${undefined} | ${{ ':user_id': 4 }} | ${{ project_id: 3 }} | ${''}
${'/foo/bar'} | ${{ ':user_id': 4 }} | ${{ project_id: 3 }} | ${'/foo/bar?project_id=3'}
${'/:user_id/bar'} | ${{ ':user_id': 4 }} | ${{ project_id: 3 }} | ${'/4/bar?project_id=3'}
${'/:wrong_id/bar'} | ${{ ':user_id': 4 }} | ${{ project_id: 3 }} | ${'/:wrong_id/bar?project_id=3'}
${'/:first_id/bar/:second_id'} | ${{ ':first_id': 1, ':second_id': 2 }} | ${{ project_id: 3 }} | ${'/1/bar/2?project_id=3'}
${'/:first_id/bar/:second_id'} | ${{ ':first_id': 1, ':second_id': 2 }} | ${{ project_id: 3, user_id: 7 }} | ${'/1/bar/2?project_id=3&user_id=7'}
${'/:first_id/bar/:second_id'} | ${undefined} | ${{ project_id: 3, user_id: 7 }} | ${'/:first_id/bar/:second_id?project_id=3&user_id=7'}
${'/:first_id/bar/:second_id'} | ${{ ':first_id': 1, ':second_id': 2 }} | ${undefined} | ${'/1/bar/2'}
`('When path: $path, params: $params, query: $query', ({ path, params, query, expected }) => {
it(`returns ${expected}`, () => {
expect(Api.getApiPath(path, { params, query })).toBe(expected);
});
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment