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

Add more stuff to UserTest#setup_all. #14433

Merged
merged 4 commits into from Apr 18, 2017
Merged

Add more stuff to UserTest#setup_all. #14433

merged 4 commits into from Apr 18, 2017

Conversation

ashercodeorg
Copy link
Contributor

No description provided.

@ashercodeorg
Copy link
Contributor Author

Note that the last commit is a hack. Really, we should be changing FactoryGirl to not set the confirmed_at column for a student. But as confirmation is being deprecated as we speak (see PR#14406), it does not seem worth the effort.

Copy link
Contributor

@wjordan wjordan left a comment

Choose a reason for hiding this comment

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

LGTM, nice cleanup!

user = create :student
user.update!(races: %w(white black hispanic asian american_indian hawaiian))
assert_equal %w(nonsense), user.reload.races
@student.reload.update!(races: %w(white black hispanic asian american_indian hawaiian))
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious if the .reload was added here for a necessary reason (no need to change since the tests are currently passing).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was flaky without it. Might be worth understanding why.

@ashercodeorg ashercodeorg merged commit 73eed32 into staging Apr 18, 2017
@ashercodeorg ashercodeorg deleted the userTest branch April 18, 2017 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants