Skip to content

Conversation

@diti0-dot
Copy link
Contributor

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.

Copy link
Collaborator

@jmilljr24 jmilljr24 left a 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)
Copy link
Collaborator

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@diti0-dot diti0-dot requested a review from jmilljr24 January 23, 2026 06:15
Copy link
Collaborator

@jmilljr24 jmilljr24 left a comment

Choose a reason for hiding this comment

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

@diti0-dot Wonderful!!

@jmilljr24 jmilljr24 merged commit 42a9a45 into rubyforgood:main Jan 23, 2026
3 checks passed
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.

Add a test for: Facilitators can submit a workshop log

2 participants