Skip to content

Instantly share code, notes, and snippets.

@cironunes
Last active August 29, 2017 21:21
Show Gist options
  • Save cironunes/460656ade5b39103a39a2002b2f9ff05 to your computer and use it in GitHub Desktop.
Save cironunes/460656ade5b39103a39a2002b2f9ff05 to your computer and use it in GitHub Desktop.
describe('#search', () => {
const dummyParams = new HttpParams().set('q', 'cironunes');
it('should throw an error if trying to search for not supported `what`', () => {
service.search('unknown', dummyParams)
.subscribe(() => {}, err => {
expect(err).toBe(`Searching for unknown is not supported. The available types are: ${service.WHAT.join(', ')}.`);
});
httpMock.expectNone(`${service.API_URL}/search/users?q=cironunes`);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment