discourse/spec/models
Nick Borromeo b51bebb200 Extract queries to keep logic in the Categories Model
This creates two methods in the Category model. This moves the model
logic to the model and just calls the Category class methods in
ListController.

This also adds tests for the two methods created in the Category
model. The motivation for this refactor is the code climate score of the
this class and readability of the code.

 Please enter the commit message for your changes. Lines starting
2014-02-08 14:10:48 -08:00
..
admin_dashboard_data_spec.rb Add a warning on dashboard if enforce_global_nicknames is checked, but access key is blank. 2013-11-18 13:45:10 -05:00
api_key_spec.rb Support for per-user API keys 2013-10-22 17:34:39 -04:00
category_featured_topic_spec.rb Make the composer and TopicCreator use category id instead of category name 2013-09-17 12:13:19 +02:00
category_featured_user_spec.rb remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
category_spec.rb Extract queries to keep logic in the Categories Model 2014-02-08 14:10:48 -08:00
category_user_spec.rb FEATURE: Added UI for adding and removing watched and muted categories 2014-01-02 17:59:08 +11:00
digest_email_site_setting_spec.rb Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
draft_sequence_spec.rb remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
draft_spec.rb Updated tests to decrease string repetition 2013-06-25 22:15:41 +08:00
email_log_spec.rb Refactor SessionController#create, reduce complexity. 2013-11-15 22:09:03 +05:30
email_token_spec.rb Only send digests to active users 2013-07-11 18:47:36 -04:00
error_log_spec.rb Convert a lot of :a => b to a: b and bring peace to the world 2013-03-25 05:07:36 +05:30
global_setting_spec.rb FEATURE: allow for additional plugin defined global settings 2014-01-02 10:46:09 +11:00
group_spec.rb FIX: Pinned topics within a category weren't working without a refresh 2013-11-18 10:52:01 -05:00
incoming_link_spec.rb BUGFIX: invalid referer would cause 500 errors 2013-12-30 14:05:44 +11:00
incoming_links_report_spec.rb Remove users column from Top Traffic Sources table on dashboard. It's not useful and very expensive to calculate. 2013-08-02 18:32:33 -04:00
invite_redeemer_spec.rb Trust Level 3: invited users start at default_invitee_trust_level + 1, unless default_invitee_trust_level is 2 or higher 2014-01-17 11:12:00 -05:00
invite_spec.rb Invite link can't be used to log in after you set a password or sign in with 3rd party 2014-01-21 16:56:41 -05:00
locale_site_setting_spec.rb Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
notification_spec.rb use consistent style 2014-02-04 12:57:52 +11:00
optimized_image_spec.rb pull hotlinked images 2013-11-05 19:07:29 +01:00
plugin_store_spec.rb PluginStore for plugin specific bits of storage 2013-08-26 12:59:17 +10:00
post_action_spec.rb fix broken build 2013-09-06 18:03:30 +10:00
post_alert_observer_spec.rb refactored a bit & tested thumbnails creation 2013-06-17 02:49:34 +02:00
post_analyzer_spec.rb Support for MDTest 2013-10-16 10:28:42 -04:00
post_detail_spec.rb Adding post details in preparation for the API importer code. 2013-10-15 09:21:30 -05:00
post_mover_spec.rb Support for choosing a destination category when splitting topics. 2013-10-29 15:30:06 -04:00
post_reply_spec.rb Initial release of Discourse 2013-02-05 14:16:51 -05:00
post_revision_spec.rb BUGFIX: history link doesn't work on deleted posts 2014-02-04 20:05:50 +01:00
post_spec.rb Posts by trust level 3 users do not have nofollow on their external links. 2014-01-15 11:40:51 -05:00
post_timing_spec.rb If a user read to the end of an auto closing topic, when it is closes just pretend they read the close message. 2013-07-04 11:47:12 +10:00
post_upload_spec.rb add proper post_uploads reverse index 2013-06-13 23:44:24 +02:00
report_spec.rb Updated tests to decrease string repetition 2013-06-25 22:15:41 +08:00
s3_region_site_setting_spec.rb Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
screened_email_spec.rb Add ScreenedUrl. Rename BlockedEmail to ScreenedEmail. 2013-08-14 16:08:23 -04:00
screened_ip_address_spec.rb Whitelisted ip addresses will not be flagged as spam by flag_sockpuppets 2013-10-23 17:11:35 -04:00
screened_url_spec.rb Screened Urls page shows results for each domain instead of each url 2013-11-04 16:24:48 -05:00
site_content_spec.rb Can change TOS content via site content editor 2013-04-05 15:21:55 -04:00
site_customization_spec.rb Revert "Re-apply with fixes: Stop using user agent to detect mobile devices. Use a media query and yepnope to load the appropriate css and customizations." 2013-12-18 14:47:22 -05:00
site_setting_spec.rb use_ssl is just confusing, it means use_https , fix name of setting 2014-01-09 10:51:38 +11:00
site_spec.rb change it so all topics MUST include a category, we store a special uncategorized category to compensate 2013-10-24 12:08:02 +11:00
top_menu_item_spec.rb BUGFIX: proper handling of top_menu_items 2014-02-03 16:08:00 +01:00
top_topic_spec.rb add top page 2013-12-24 00:50:36 +01:00
topic_allowed_user_spec.rb Initial release of Discourse 2013-02-05 14:16:51 -05:00
topic_embed_spec.rb FEATURE: Embeddable Discourse comments, now with simple-rss instead of feedzirra 2013-12-31 15:01:22 -05:00
topic_invite_spec.rb remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
topic_link_click_spec.rb FIX: Accept HTTPS or HTTP urls on redirect 2014-01-14 15:02:05 -05:00
topic_link_spec.rb Rename TopicSummary -> TopicMap 2013-11-18 12:08:21 -05:00
topic_posters_summary_spec.rb Extract Topic#posters_summary 2013-05-24 15:33:45 -07:00
topic_revision_spec.rb BUGFIX: history link doesn't work on deleted posts 2014-02-04 20:05:50 +01:00
topic_spec.rb Rename favorite to starred everywhere 2014-01-10 14:54:19 -05:00
topic_status_update_spec.rb If a user read to the end of an auto closing topic, when it is closes just pretend they read the close message. 2013-07-04 11:47:12 +10:00
topic_tracking_state_spec.rb push some work out of AR callbacks into PostCreator, add a couple of helpers for post and topic creation in test 2013-07-22 15:07:20 +10:00
topic_user_spec.rb FEATURE: proper mailing list mode 2014-02-07 11:07:52 +11:00
twitter_user_info_spec.rb ensure we have a bigint id 2013-11-22 17:51:36 +11:00
upload_spec.rb pull hotlinked images 2013-11-05 19:07:29 +01:00
user_action_spec.rb minor style fix 2014-02-03 14:50:19 +11:00
user_email_observer_spec.rb revert non queuing of emails 2013-08-27 11:52:28 +10:00
user_history_spec.rb Rename StaffActionLog to UserHistory 2013-09-10 22:01:20 -04:00
user_open_id_spec.rb moved comments to the bottom, they are way less intrusive there 2013-05-24 12:48:32 +10:00
user_search_spec.rb SiteSetting to hide regular names from users 2013-10-30 15:45:34 -04:00
user_spec.rb Track how many posts a user reads each day in user_visits 2014-01-27 11:20:19 -05:00
user_stat_spec.rb BUGFIX: UserStat spec was over ambitious with its mocking 2014-01-06 16:50:55 +11:00
user_visit_spec.rb large refactor, ship a few columns from the user table into user_stats 2013-10-07 15:04:59 +11:00
username_validator_spec.rb Extract the validation of Username format in own class to avoid 2013-02-08 12:54:47 -05:00
view_spec.rb views: convert 'ip' (bigint) -> 'ip_address' (inet) 2013-06-25 19:47:25 -04:00