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 .valid? checks for section course and script #22935

Merged
merged 2 commits into from Jun 7, 2018

Conversation

maddiedierker
Copy link
Contributor

This PR is follow-up for #22902 and adds checks upon updating sections to determine whether or not the provided course/script ids are valid.

Note: this code is going to be heavily refactored in upcoming PRs, so this is all temporary.

Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

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

nice improvement!

section.reload
assert_response :success
assert_nil section.course_id
refute_equal 1, section.course_id
Copy link
Member

Choose a reason for hiding this comment

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

redundant check after asserting nil? here and below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haha good point. i'll update 👍

@maddiedierker maddiedierker merged commit c9fcfac into staging Jun 7, 2018
@maddiedierker maddiedierker deleted the update-sections-fix branch June 7, 2018 19:33
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.

None yet

2 participants