Skip to content

Instantly share code, notes, and snippets.

@idlehands
Created March 8, 2024 20:24
Show Gist options
  • Save idlehands/8a35d1e33fa76b7be2ef378c5e691443 to your computer and use it in GitHub Desktop.
Save idlehands/8a35d1e33fa76b7be2ef378c5e691443 to your computer and use it in GitHub Desktop.
RFC: key for adding
assert_values_for(
expected: quote_request,
actual: quote,
fields: fields_for(OmniWeb.Schema.QuoteRequest),
field_name_translations: [
# explicit
origin_postal_code: [actual: :origin_zip],
destination_postal_code: [expected: :destination_zip, actual: :destination_zipcode],
# implicit
pieces: :freight_pieces, # assumes field is from expected and that this is on actual?
weight: :freight_weight
],
skip_fields: [
:selected_common_pickup_accessorials
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment