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

Test spec edits #1

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

Conversation

derrickbeining
Copy link

@derrickbeining derrickbeining commented Aug 12, 2017

The original spec on line 48 was expecting the err.message to be something that it wasn't, and therefore causing the spec to fail even though my code was correct. I've changed the spec so that it expects the notNull error.message I was getting.

Not sure if this has been an issue for anyone else, but it might be a good idea to notify everyone else so they don't waste time trying to figure out why they can't get it to pass.

});
}, function ( err ) {
expect( err ).to.be.an.instanceOf( Error );
expect(err.errors[0].type).to.contain('notNull Violation');
Copy link
Author

Choose a reason for hiding this comment

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

alternatively:
expect(err.message).to.contain('Validation Error');
seems to work too

@derrickbeining
Copy link
Author

derrickbeining commented Aug 12, 2017

Also found that the spec on line 52 was passing my code when it should have been failing. I've added an edit to that as well so that it throws an error if it passes when it should've failed.

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