Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #19 from feathersjs/multi-id-prop
Browse files Browse the repository at this point in the history
Verify id property for multiple updates
  • Loading branch information
daffl authored Sep 20, 2016
2 parents 77d8ad2 + 0f6e010 commit 1588d8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/common-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { expect } from 'chai';

function common(app, errors, serviceName = 'people', idProp = 'id') {
describe('Common tests', () => {
describe(`Common tests, ${serviceName} service with ${idProp} id property`, () => {
const _ids = {};

beforeEach(() =>
Expand Down Expand Up @@ -520,7 +520,10 @@ function common(app, errors, serviceName = 'people', idProp = 'id') {

return app.service(serviceName).create(items).then(data => {
expect(data).to.not.be.empty;
expect(Array.isArray(data)).to.equal(true);
expect(typeof data[0][idProp]).to.not.equal('undefined');
expect(data[0].name).to.equal('Gerald');
expect(typeof data[1][idProp]).to.not.equal('undefined');
expect(data[1].name).to.equal('Herald');
});
});
Expand Down

0 comments on commit 1588d8a

Please sign in to comment.