There is no easy way to make the original product invalid, but we can
make sure the cloned product will be invalid. The cloned product add
"COPe OF " in front of the product's name, so by starting with a name
that's long enough, the cloned product will have a name longer that 255
char and will then be invalid.
We now know which errors to expect. We still let other unknown errors raise higher up, where they will be logged with BugSnag, and treated as internal_server_error.
It turns out that the duplicator still raises an exception in some cases. Now I think I see why the the controller was catching the exceptions. At least now we know which exceptions to catch.
Instead of using the auth method name, let's just not supply username
and password when we don't want to authenticate. The two affected
servers AU and CA don't have credentials set anyway. This is compatible.
The specs needed changing though.
This was effectively being done before for the product's sku (stored on the master variant) via the #duplicate_variant method, but now it needs to be done explicitly on the product in #duplicate_product
This option came from Spree and we never used it. The config input field
is disabled in the admin interface and I checked our managed databases.
I don't think that we will want this feature in the future either.
Staging sends unmodified emails which is more realistic and we haven't
had a use case to intercept those emails. There's still the BCC option
if we need additional access.
This only makes sense in the context of Products which only have "master" variants, and we removed that option a while back.
Remove #variants? check from ProductStock concern
Spree used to give you more options to configure ActionMailer but our
setup is much simpler. We can remove unused code.
The removed option was never used by OFN and defaulted to true. We don't
need a database migration because the value isn't set in the database.
DEPRECATION WARNING: `#deliver` is deprecated and will be removed in Rails 5. Use `#deliver_now` to deliver immediately or `#deliver_later` to deliver through Active Job.
This was due to an incompatibility between two recent PRs: 5763 and
5733. PR 5733 did not take into account 5763 (the confirm email method was removed) and so the specs introduced
were broken.
We didn't actually change any logic in our version of the Spree
environment file but if we do that in the future, we want to be sure
that it takes effect. Our file was ignored and not loaded before.