dboehmer / coocook

👨‍🍳🦉 Web application for collecting recipes and making food plans
https://coocook.org/
Other
11 stars 2 forks source link

Tests fail with CATALYST_DEBUG=1 #141

Open dboehmer opened 3 years ago

dboehmer commented 3 years ago

That's what happens when you introduce code branches into your app depending on CATALYST_DEBUG … :disappointed:

In debug mode HTTP does not redirect to HTTPS in order to allow development on localhost without a valid HTTPS certificate. This breaks some tests. CATALYST_DEBUG=1 is useful to run a test with verbose debug output from Catalyst, e.g. POST data and involved Catalyst actions.

Do we just ignore this? How could we fix that? Maybe extend $t->base_is() to rewrite the URL scheme or change every call to $t->base_like( qr{https?://...} ). For tests that can't be fixed with CATALYST_DEBUG we could skip them.