Skip to content

Commit

Permalink
adds test for invalid filter
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Jan 20, 2017
1 parent e85160c commit 7de4d61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DataManager.js
Expand Up @@ -70,7 +70,8 @@ export default class DataManager extends Core {
}
return Promise.resolve()
.then(() => {
const request = this.newRequest().follow('ec:datamanager/by-id')
const request = this.newRequest()
.follow('ec:datamanager/by-id')
.withTemplateParameters({ dataManagerID });
return get(request);
})
Expand Down
6 changes: 6 additions & 0 deletions test/Core.test.js
Expand Up @@ -326,4 +326,10 @@ describe('optionsToQuery', () => {
};
throws.should.throw(Error);
});
it('should throw on unknown filter type', () => {
const throws = () => {
Core.optionsToQuery({ filter: { property: { unknown: '1' } } });
};
throws.should.throw(Error);
});
});

0 comments on commit 7de4d61

Please sign in to comment.