docbrown/spec
Julianna Tetreault 0ee74d1e26
Validate Image URLs in SiteConfig (#11299) [deploy]
* Adds image URL validation to image URLs in configs_controller.rb

* Adds additional image URLs to #valid_image_url in configs_controller.rb

* Adds tests around valid image URLs to configs_spec.rb

* WIP: sets strict conditions for before_action

* WIP: comments out unused code for draft PR

* WIP: cleans up configs_controller.rb for draft PR review

* Renames constant to more explicit IMAGE_FIELDS in configs_controller.rb

* Removes unnecessary comments from admin/configs_spec.rb

* Checks for matching keys in params and IMAGE_FIELDS in configs_controller

* Refactors #valid_image_urls and #valid_image_url in ConfigsController (THANK U, ANDY)

* Refactors image-related code and error messages in Admin::ConfigsController

* Renames expected_image_url to invalid_image_url and removes useless test

* Fix: update the tests to contain valid image urls so that they pass the validation.

* Adjusts tests & VALID_URL regex to validate images rather than image-specific URL

* Replaces $ with \z per Rhymes suggestion and feedback

* Adds accidentally removed code

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-11-12 12:02:07 -07:00
..
black_box Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
decorators CSS Cleanups, part 2 (#10527) 2020-10-03 06:57:57 +02:00
factories Feature:Send Alerts for Failed DataUpdateScripts to Datadog (#11381) 2020-11-12 10:59:54 -06:00
fixtures Prepare for profile column drop (#11246) 2020-11-09 10:17:39 +07:00
generator Add service generator (#11265) 2020-11-10 09:09:35 +07:00
helpers Email login always on (#11307) 2020-11-12 09:32:58 -06:00
initializers Refactor:Implement Carrierwave Monkeypatch in all Envs (#11233) 2020-11-03 10:51:53 -06:00
labor Move ArticleSuggester to Articles::Suggest service (#11370) 2020-11-11 13:06:33 -05:00
lib Prepare for profile column drop (#11246) 2020-11-09 10:17:39 +07:00
liquid_tags Conditionally hide onboarding task card (#11259) 2020-11-04 11:04:34 -08:00
mailers Add mailer previews for Devise mailer (#10890) 2020-11-02 09:10:00 +01:00
models Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
policies [deploy] [Admin Tooling] Allow admins unpublish articles from the Mod Actions Panel (#10038) 2020-09-02 16:08:08 -05:00
queries/admin Add all new functionality for trusted (#10816) 2020-10-15 17:00:49 -04:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
requests Validate Image URLs in SiteConfig (#11299) [deploy] 2020-11-12 12:02:07 -07:00
routing Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
serializers/search [deploy] Refactor:Remove Reaction Search Code (#10377) 2020-09-23 12:27:50 -05:00
services Refactor:Replace Production Check with Average Metrics (#11096) 2020-11-12 10:03:10 -06:00
support Add Feeds::Import service class (#10998) 2020-10-30 15:01:44 +01:00
system Developer experience/security: Make dev/test blow up if current_user is used erroneously (#11237) 2020-11-12 11:54:23 -05:00
tasks Refactor:Send Welcome Broadcast Notifications From Sidekiq (#9923) 2020-08-21 12:57:08 -04:00
uploaders Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556) 2020-07-29 11:31:01 +02:00
view_objects Enable Rubocop 0.89 cops and fix Lint/ violations (#9709) 2020-08-10 16:57:12 +02:00
views Show canonical URL on article even after it has been updated (#11256) 2020-11-10 13:30:21 +01:00
workers Feature:Send Alerts for Failed DataUpdateScripts to Datadog (#11381) 2020-11-12 10:59:54 -06:00
rails_helper.rb Do not set SiteConfig values in specs (#11125) 2020-10-27 15:56:31 -04:00
spec_helper.rb Manually load dotenv in test (#9971) 2020-08-24 20:19:03 +02:00