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

Kyle Freyermuth #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Kyle Freyermuth #27

wants to merge 2 commits into from

Conversation

KJFreys1
Copy link

I did NOT get 100% on this. I was only able to get this work by adding by changing line 274 to expect(res.body.notes[0]._id).to.equal(note._id.toString()) instead of expect(res.body.notes[0]).to.equal(note._id.toString()). I don't really understand why it was written the previous way as you're comparing it to the _id key of note on the right. Please get back to me when you can on what my error is.

@KJFreys1
Copy link
Author

Never mind, I see my issue now. I should have had my model look like:

notes: [
{
ref: "Note",
type: mongoose.Schema.Types.ObjectId
}
]

instead of:

notes: [noteSchema]]

@KJFreys1
Copy link
Author

So I only got a 17/18 on the tests really. Don't want to get full credit if I didn't do it the right way

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.

1 participant