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:
Jason Hsu
2020-10-13 12:14:15 -05:00
parent 0d051b7c7d
commit a8eaabc5da

View File

@@ -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