Skip to content

Commit c646d1c

Browse files
author
troy.steuwer
committed
#56 fixing eslint errors
1 parent 2cc84d1 commit c646d1c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/update.test.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ describe('loopback json api component update method', function () {
173173
.send({ data: { type: 'posts', id: 1, attributes: { } } })
174174
.set('Content-Type', 'application/json')
175175
.expect(200)
176-
.end(function(err, res) {
176+
.end(function (err, res) {
177177
expect(err).to.equal(null);
178178
expect(res.body).to.have.all.keys('data');
179179
expect(res.body.data).to.have.all.keys('id', 'type', 'attributes', 'links');
@@ -183,21 +183,21 @@ describe('loopback json api component update method', function () {
183183
expect(res.body.data.attributes).to.not.have.keys('id');
184184
expect(res.body.data.attributes.title).to.equal('my post');
185185
expect(res.body.data.attributes.content).to.equal('my post content');
186-
done();
187-
});
186+
done();
187+
});
188188
});
189189

190190
it('PATCH /models/:id with no `attributes` should not return an error and should not modify existing attributes', function (done) {
191191
request(app).patch('/posts/1')
192192
.send({
193193
data: {
194-
type: 'posts',
194+
type: 'posts',
195195
id: 1
196196
}
197197
})
198198
.set('Content-Type', 'application/json')
199199
.expect(200)
200-
.end(function(err, res) {
200+
.end(function (err, res) {
201201
expect(err).to.equal(null);
202202
expect(res.body).to.have.all.keys('data');
203203
expect(res.body.data).to.have.all.keys('id', 'type', 'attributes', 'links');
@@ -207,8 +207,8 @@ describe('loopback json api component update method', function () {
207207
expect(res.body.data.attributes).to.not.have.keys('id');
208208
expect(res.body.data.attributes.title).to.equal('my post');
209209
expect(res.body.data.attributes.content).to.equal('my post content');
210-
done();
211-
});
210+
done();
211+
});
212212
});
213213

214214
it('PATCH /models/:id should return an 400 error if `type` key is not present and include an errors array', function (done) {
@@ -225,6 +225,7 @@ describe('loopback json api component update method', function () {
225225
.expect(400)
226226
.set('Content-Type', 'application/json')
227227
.end(function (err, res) {
228+
expect(err).to.equal(null);
228229
expect(res.body).to.have.keys('errors');
229230
expect(res.body.errors).to.be.a('array');
230231
expect(res.body.errors.length).to.equal(1);
@@ -249,6 +250,7 @@ describe('loopback json api component update method', function () {
249250
.expect(400)
250251
.set('Content-Type', 'application/json')
251252
.end(function (err, res) {
253+
expect(err).to.equal(null);
252254
expect(res.body).to.have.keys('errors');
253255
expect(res.body.errors).to.be.a('array');
254256
expect(res.body.errors.length).to.equal(1);

0 commit comments

Comments
 (0)