Skip to content

Conversation

@davezuckerman
Copy link
Contributor

added struct file for affiliate borrow request

moved struct into model for borrow_request

removed borrow_request.rb struct file

Changing doemoff_patron_email_form to use struct similar to affiliate_borrower

Changing stack pass for to use deliver_later

Changed deliver_now to deliver_later for more forms

added struct file for affiliate borrow request

moved struct into model for borrow_request

removed borrow_request.rb struct file

Changing doemoff_patron_email_form to use struct similar to affiliate_borrower

Changing stack pass for to use deliver_later

Changed deliver_now to deliver_later for more forms
@davezuckerman
Copy link
Contributor Author

deliver_later needs to be serialized and several of the forms don't have db entries so needed to be reworked a bit. The request_mailer views for several of these use dot notation. I think this approach should work for those. (e.g. AffilliateBorrowRequestForm, SecurityIncidentReportForm)

Copy link
Member

@awilfox awilfox left a comment

Choose a reason for hiding this comment

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

Looks good overall, a few questions on some of the details.

Comment on lines +23 to +25
expect do
@form.submit!
end.to have_enqueued_job(ActionMailer::MailDeliveryJob).with(
Copy link
Member

Choose a reason for hiding this comment

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

We have expect { @form.submit! } in other places (included the AffiliateBorrowRequestFormSpec just above this file in the diff). I think we should be consistent with block syntax with these tests.

Copy link
Contributor Author

@davezuckerman davezuckerman Feb 10, 2026

Choose a reason for hiding this comment

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

rubocop complained and said that the format above "expect { @form.submit! }" shouldn't be used for multi line blocks. I don't agree with rubocop though. I think it looks better having be consistent

Comment on lines +73 to +75
expect do
invoice.submit!
end.to have_enqueued_job(ActionMailer::MailDeliveryJob)
Copy link
Member

Choose a reason for hiding this comment

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

As above, this should probably be expect { invoice.submit! }.to …

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above

Copy link
Member

@anarchivist anarchivist left a comment

Choose a reason for hiding this comment

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

generally looks good to me - thank you for taking this on!

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.

3 participants