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

Improve tests for empty vs. default values #1707

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Apr 9, 2019

Description

In #1705, I had to modify the tests added by #1704 to make them pass on different databases (SQL vs NoSQL, etc.)

This pull request is cherry-picking the changes from #1705 into master.

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

Copy link
Contributor

@hacksparrow hacksparrow left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@b-admike b-admike left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment.

active: undefined,
});
const found = await Player.upsertWithWhere({id: created.id}, {name: 'updated'});
should(found.toObject().active).be.oneOf([
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we want to preserve the checks for id and name as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Those properties are not really affected by default values, I feel it's ok to not check them - we have other tests in place to verify.

@bajtos bajtos merged commit a8d0d78 into master Apr 9, 2019
@bajtos bajtos deleted the test/fix-default-values branch April 9, 2019 16:12
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.

3 participants