-
Notifications
You must be signed in to change notification settings - Fork 16
add test for workshopLog submission #755
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
Conversation
jmilljr24
left a comment
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.
@diti0-dot Just a couple comments. The rest looks good!
| create(:workshop, title: 'The best workshop in the world', windows_type: adult_window, featured: true) | ||
| create(:workshop, title: 'The best workshop on mars', windows_type: adult_window, featured: true) | ||
|
|
||
| @project = Project.first || create(:project, name: "Test Project", windows_type_id: @windows_type.id) |
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.
Is there a reason to have the or in this?
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.
@diti0-dot This is just a nit, but I don't see the benefit of checking for the first record. I'd rather stick with just creating the record you need.
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.
removed the OR operator as suggested.
jmilljr24
left a comment
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.
@diti0-dot Wonderful!!
What is the goal of this PR and why is this important?
To add a system test that verifies facilitators can successfully submit workshop logs with all required fields.
How did you approach the change?
Created projects and associated them with the current logged-in facilitator via ProjectUser so the project field is selected by default, then tested each form section as specified.
Anything else to add?
Let me know if anything is missing from the test coverage or requirements.