Skip to content

lab-regan#7

Open
reganoneill wants to merge 1 commit intocodefellows-javascript-401d13:masterfrom
reganoneill:lab12
Open

lab-regan#7
reganoneill wants to merge 1 commit intocodefellows-javascript-401d13:masterfrom
reganoneill:lab12

Conversation

@reganoneill
Copy link

No description provided.

'use strict';

const createError = require('http-errors');
const debug = require('debug');
Copy link

@jalleng jalleng Mar 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add on the debug extension here. ('drink:error-middleware');

};//end deleteItem


exports.availIDs = function(schemaName){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add in your debug lines to these two functions. So you can see if these functions are getting called when you expect them to.


Drink.fetchIDs = function(){
debug('fetchIDs');
storage.availIDs('drink');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should return this.

expect(res.status).to.equal(200);
expect(res.body.id).to.equal(this.tempDrink.id);
expect(res.body.name).to.equal(this.tempDrink.name);
expect(res.body.content).to.equal(this.tempDrink.content);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you are checking for the properties that you set on the tempDrink.

if(err) return done(err);
expect(res.status).to.equal(200);
expect(res.body.name).to.equal(exampleDrink.name);
expect(res.body.content).to.equal(exampleDrink.content);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Does your exampleDrink have a 'content' property?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants