mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Used guard clause in spec/support/request/checkout_helper.rb instead of an if statement with two actions; reduces the number of RuboCop offenses from 108 to 107
This commit is contained in:
@@ -49,9 +49,9 @@ module CheckoutHelper
|
||||
|
||||
fill_out_billing_address
|
||||
|
||||
if save_default_addresses
|
||||
check "Shipping address same as billing address?"
|
||||
check "Save as default shipping address"
|
||||
end
|
||||
return unless save_default_addresses
|
||||
|
||||
check "Shipping address same as billing address?"
|
||||
check "Save as default shipping address"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user