discourse/spec/models
Sam 5f64fd0a21 DEV: remove exec_sql and replace with mini_sql
Introduce new patterns for direct sql that are safe and fast.

MiniSql is not prone to memory bloat that can happen with direct PG usage.
It also has an extremely fast materializer and very a convenient API

- DB.exec(sql, *params) => runs sql returns row count
- DB.query(sql, *params) => runs sql returns usable objects (not a hash)
- DB.query_hash(sql, *params) => runs sql returns an array of hashes
- DB.query_single(sql, *params) => runs sql and returns a flat one dimensional array
- DB.build(sql) => returns a sql builder

See more at: https://github.com/discourse/mini_sql
2018-06-19 16:13:36 +10:00
..
about_spec.rb
admin_dashboard_data_spec.rb FEATURE: Display force_https warning in admin problems dashboard 2018-01-11 12:16:10 +05:30
api_key_spec.rb Validate uniquness of api_key. 2017-07-24 21:46:08 +09:00
application_request_spec.rb moving redis to readonly mode destablizes the test suite 2017-10-25 14:39:49 +11:00
backup_spec.rb FEATURE: Support subfolders in SiteSetting.s3_backup_bucket. 2016-08-15 16:14:51 +08:00
badge_spec.rb FEATURE: grant badges in post admin wrench (#5498) 2018-01-22 14:10:53 +11:00
badge_type_spec.rb Add spec to cover Badge Type has many Badges relation 2017-09-20 00:51:32 -03:00
category_featured_topic_spec.rb refinement and test for batch mode on feature_topics 2017-12-20 13:58:05 +11:00
category_group_spec.rb
category_list_spec.rb FIX: return regular notification level for categories when not set by user 2017-12-30 20:36:58 +01:00
category_spec.rb FEATURE: Webhook for group and category events 2018-03-27 11:53:35 +05:30
category_user_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00
color_scheme_color_spec.rb
color_scheme_spec.rb FIX: ColorScheme color missing was returning "nil" 2018-05-28 11:46:00 +10:00
developer_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
digest_email_site_setting_spec.rb
directory_item_spec.rb FIX: properly omit inactive and silenced users from directory 2017-12-19 12:53:59 +11:00
discourse_single_sign_on_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00
draft_sequence_spec.rb Improve specs. 2017-09-25 13:49:00 +08:00
draft_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
email_change_request_spec.rb FIX: Don't allow invalid email to be saved. 2016-12-21 17:47:11 +08:00
email_log_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
email_token_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
embeddable_host_spec.rb FIX: path whitelist for embedded comments didn't work with non-ASCII chars 2017-12-12 20:17:46 +01:00
emoji_spec.rb Fixes emoji name to code missing tones 2017-06-13 14:10:26 -04:00
given_daily_like_spec.rb FEATURE: remove the timecop gem 2017-07-24 12:11:10 -04:00
global_setting_spec.rb FEATURE: Allow plugins to easily add defaults to GlobalSetting 2017-11-16 08:39:29 +11:00
group_history_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
group_spec.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
group_user_spec.rb FEATURE: default notification level for group messages 2017-04-20 15:47:35 -04:00
incoming_link_spec.rb Tests for IncomingLink IP logging 2018-05-15 09:32:29 +10:00
incoming_links_report_spec.rb FIX: don't use PMs in Incoming Links reports 2018-05-16 16:55:54 +02:00
invite_redeemer_spec.rb FIX: better handling of invite links after they are redeemed 2018-05-08 20:17:57 +05:30
invite_spec.rb FIX: do not add invited user to automatic groups 2018-05-28 17:17:48 +05:30
locale_site_setting_spec.rb FEATURE: Allow plugins to register a new locale 2018-01-25 14:57:41 +01:00
mailing_list_mode_site_setting_spec.rb Remove daily mailing mode option as it doesn't scale. 2017-05-05 12:21:50 +08:00
notification_spec.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
optimized_image_spec.rb SECURITY: protect upload params, only allow very strict filenames 2016-12-19 10:16:18 +11:00
permalink_spec.rb
plugin_store_spec.rb REFACTOR: Instance methods added to 'PluginStore' model for easy access (#5315) 2017-11-15 10:10:20 -05:00
post_action_spec.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
post_action_type_spec.rb
post_analyzer_spec.rb FIX: Don't allow links with no href 2018-03-28 12:32:16 -04:00
post_detail_spec.rb
post_mover_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00
post_reply_spec.rb FIX: Update post replies when we move posts. (#4324) 2016-07-13 17:34:21 +02:00
post_spec.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
post_timing_spec.rb FIX: more accurate counting of posts read. Skipping to the end of a topic does not count all posts as read in user stats. 2017-11-17 16:08:46 -05:00
post_upload_spec.rb
queued_post_spec.rb minor optimizations for post rejected logs 2018-06-02 09:44:55 +05:30
quoted_post_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00
remote_theme_spec.rb FIX: color schemes not updating when remote saves 2018-03-15 18:26:54 +11:00
report_spec.rb DEV: ensure specs run in consistent times 2018-05-25 14:22:43 +10:00
s3_region_site_setting_spec.rb add 'us-east-2' S3 region 2017-07-10 15:36:38 +02:00
screened_email_spec.rb FEATURE: remove the timecop gem 2017-07-24 12:11:10 -04:00
screened_ip_address_spec.rb FIX: error when trying to block an IP address. Return a message when IP address matches an existing screened IP address, including ranges. 2018-03-19 14:34:43 -04:00
screened_url_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
search_log_spec.rb Fix randomly failing specs due to SearchLog cache. 2018-04-23 10:10:10 +08:00
site_setting_spec.rb FIX: disallow invalid top_menu and post_menu and share_links 2018-04-26 17:00:56 +10:00
site_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
stylesheet_cache_spec.rb Silence CSS logging in development - it's way too noisy 2017-08-16 10:59:56 -04:00
tag_group_spec.rb FIX: tags in a 'visible by everyone but usable only by staff' group weren't visible by everyone 2018-05-16 09:48:19 +02:00
tag_spec.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
tag_user_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00
theme_field_spec.rb Add spec + make it work with .raw templates 2018-04-09 16:47:28 +10:00
theme_spec.rb FEATURE: we need access to settings in theme js 2018-03-05 15:35:41 +11:00
top_menu_item_spec.rb correct specs 2018-04-26 17:24:16 +10:00
top_topic_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_allowed_user_spec.rb
topic_converter_spec.rb fix false spec 2018-04-04 12:20:50 +05:30
topic_embed_spec.rb improve spec 2018-05-02 17:16:00 +10:00
topic_featured_users_spec.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
topic_invite_spec.rb
topic_link_click_spec.rb TEST: Add TopicLinkClick spec for ip logging 2018-05-22 16:05:38 +10:00
topic_link_spec.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
topic_list_spec.rb FEATURE: replace PM tags dropdown with a dedicated tags page 2018-03-13 13:06:58 +05:30
topic_participants_summary_spec.rb
topic_posters_summary_spec.rb
topic_spec.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
topic_tag_spec.rb REFACTOR: New spec tests and code improvement 2018-02-22 20:27:02 +05:30
topic_timer_spec.rb workaround fabricator not working correctly 2018-06-12 14:44:59 +10:00
topic_tracking_state_spec.rb DEV: Better diagnostic when topic tracking state tests fail. 2018-05-24 15:36:41 +08:00
topic_user_spec.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
topic_view_item_spec.rb TEST: TopicViewItem ip logging test 2018-06-12 12:43:56 +10:00
translation_override_spec.rb FIX: Translation overrides for flag types didn't expire cache 2018-03-16 22:10:19 +01:00
trust_level3_requirements_spec.rb Prefer save!/create! over save/create. 2018-04-25 13:39:45 +08:00
twitter_user_info_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
unsubscribe_key_spec.rb
upload_spec.rb fix get from url for external uploads without CDN 2018-06-13 16:21:28 +10:00
user_action_spec.rb FIX: Wrong target user displayed for user actions in activity stream. 2018-05-18 11:28:13 +08:00
user_api_key_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
user_archived_message_spec.rb FEATURE: Live updates for user's messages page. 2018-03-06 18:15:21 +08:00
user_auth_token_spec.rb FEATURE: remove support for legacy auth tokens 2018-05-04 10:12:10 +10:00
user_avatar_spec.rb FIX: Tests could get stucked in infinite loop if it fails to resolve IP of a hostname. 2018-03-28 14:49:05 +08:00
user_badge.rb
user_export_spec.rb FIX: Clean up stale UserExport records daily. 2018-06-05 09:43:40 +08:00
user_history_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
user_open_id_spec.rb
user_option_spec.rb FIX: redirect to top wasn't working 2017-10-04 22:08:41 +02:00
user_profile_spec.rb Fix brittle spec. 2018-06-01 11:56:56 +08:00
user_profile_view_spec.rb Style fix for test 2018-05-25 15:54:14 +10:00
user_search_spec.rb FEATURE: user directory returns staged users during search 2017-11-19 01:17:31 +01:00
user_second_factor_spec.rb Review Changes for f4f8a293e7. 2018-02-21 14:55:49 +08:00
user_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00
user_stat_spec.rb PERF: reduce queries required for post timings 2018-01-17 15:50:41 +11:00
user_summary_spec.rb
user_visit_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
username_validator_spec.rb
watched_word_spec.rb FIX: don't downcase watched words on input since it can break the watched_words_regular_expressions setting 2018-01-09 16:51:59 -05:00
web_crawler_request_spec.rb FEATURE: control which web crawlers can access using a whitelist or blacklist 2018-03-22 15:41:02 -04:00
web_hook_event_spec.rb FEATURE: Retain the latest 30 days of WebHookEvent records by default. 2017-11-08 14:11:01 +08:00
web_hook_spec.rb DEV: Take 2 Queue jobs in tests by default. 2018-05-31 16:23:23 +08:00