Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of confusing error message #389

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/unit/mocks/mock-any-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ module('MockAny', function(hooks) {

assert.equal(fooMock.timesCalled, 1, 'fooMock#timesCalled is called once');
assert.equal(barMock.timesCalled, 1, 'barMock#timesCalled is called once');

mock({url: '/api/post/some-stuff', type: method}).withParams({ rightParams: true });
await fetchJSON({url, params: { wrongParams: true }, method});

});

test("#withSomeParams", async function(assert) {
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/mocks/mock-find-all-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ module('MockFindAll', function(hooks) {
assert.equal(mockQ.timesCalled, 1, 'mockQuery is used');
});

test("#withParams", async function(assert) {
let mockFQ = mockFindAll('user', 2).withParams({rightParams: true});

await FactoryGuy.store.query('user', { rightParams: false });
});

module('#getUrl', function() {

test("uses urlForFindAll if it is set on the adapter", function(assert) {
Expand Down