-
Notifications
You must be signed in to change notification settings - Fork 194
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
Content modelling/748 add review to edit #9735
Conversation
@@ -28,6 +28,9 @@ def valid_state?(state) | |||
event :schedule do | |||
transitions from: %i[draft], to: :scheduled | |||
end | |||
event :draft do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is a different in_review
state here, rather than draft
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the combination of using assign_attributes
and valid?
means we don't have to mess about with this now :)
this is consistent with structure we've used in other tests, and will allow us to add a `describe` block as we had more logic branches to it.
during the review stage, we want to check the scheduled values from the previous page are valid, but not yet put the edition into a scheduled or published state. here we validate there are no errors by updating the edition via the `assign_attributes` method which does not save the changes to the db.
67797cf
to
9671e13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! LGTM 👍
https://trello.com/c/uMVUEObq/748-add-review-email-address-screen-as-part-of-the-edit-journey
Follow these steps if you are doing a Rails upgrade.