We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a853b7b commit 8113f1cCopy full SHA for 8113f1c
test/server/plural.js
@@ -623,13 +623,22 @@ describe('Server', function () {
623
router.db._.id = '_id'
624
})
625
626
- it('should be possible to override id property', function (done) {
+ it('should be possible to GET using a different id property', function (done) {
627
request(server)
628
.get('/posts/1')
629
.expect('Content-Type', /json/)
630
.expect(router.db.getState().posts[0])
631
.expect(200, done)
632
633
634
+ it('should be possible to POST using a different id property', function (done) {
635
+ request(server)
636
+ .post('/posts')
637
+ .send({ body: 'hello' })
638
+ .expect('Content-Type', /json/)
639
+ .expect({_id: 2, body: 'hello'})
640
+ .expect(201, done)
641
+ })
642
+
643
644
0 commit comments