discourse/spec
Blake Erickson 6ac3f1f7b5
DEV: Return 400 instead of 500 for invalid top period (#13828)
* DEV: Return 400 instead of 500 for invalid top period

This change will prevent a fatal 500 error when passing in an invalid
period param value to the `/top` route.

* Check if the method exists first

I couldn't get `ListController.respond_to?` to work, but was still able
to check if the method exists with
`ListController.action_methods.include?`. This way we can avoid relying
on the `NoMethodError` exception which may be raised during the course
of executing the method.

* Just check if the period param value is valid

* Use the new TopTopic.validate_period method
2021-07-23 14:58:10 -06:00
..
components DEV: Make rubocop happy. 2021-07-23 16:04:41 +08:00
fabricators DEV: Add SMTP group ID to EmailLog (#13381) 2021-06-15 11:29:46 +10:00
fixtures DEV: fix test (missed a reference to master) 2021-07-19 12:47:45 -04:00
helpers FIX: Assets for the theme tests page are not compressed (#13736) 2021-07-14 22:52:35 +03:00
import_export
initializers FEATURE: A low priority filter for the review queue. (#12822) 2021-04-23 15:34:24 -03:00
integration DEV: Isolate multisite specs (#13634) 2021-07-07 18:57:42 +02:00
integrity DEV: Fix a flaky Onceoff spec (#13314) 2021-06-07 20:38:31 +02:00
jobs FIX: Change email from to not have via site_name for group SMTP (#13788) 2021-07-20 11:56:04 +10:00
lib FIX: manually adds frowning_face_with_open_mouth for apple (#13528) 2021-07-21 23:27:20 +02:00
mailers FEATURE: Use group SMTP job and mailer instead of UserNotifications change (#13489) 2021-06-28 08:55:13 +10:00
models FIX: manually adds frowning_face_with_open_mouth for apple (#13528) 2021-07-21 23:27:20 +02:00
multisite DEV: Isolate multisite specs (#13634) 2021-07-07 18:57:42 +02:00
requests DEV: Return 400 instead of 500 for invalid top period (#13828) 2021-07-23 14:58:10 -06:00
script/import_scripts DEV: If disabled do not change setting after import (#12142) 2021-02-19 09:33:35 -07:00
serializers FIX: Serialize flair group ID for preferences page (#13741) 2021-07-20 13:06:40 +03:00
services DEV: Spec shouldn't depend on translation 2021-07-21 12:24:54 +08:00
support FIX: Make sure reset-new for tracked is not limited by per_page count (#13395) 2021-06-17 08:20:09 +10:00
tasks FIX: remove migrate_from_s3 task that silently corrupts data (#11703) 2021-01-17 22:33:29 +01:00
views/omniauth_callbacks
rails_helper.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
swagger_helper.rb FEATURE: Let users select flair (#13587) 2021-07-08 10:46:21 +03:00