Commit Graph

83 Commits

Author SHA1 Message Date
Vinoth Kannan 7cbda949f1 REFACTOR: New spec tests and code improvement 2018-02-22 20:27:02 +05:30
Arpit Jalan ff0376a80b rename 'enable_private_messages' to 'enable_personal_messages' 2018-02-01 13:25:29 +05:30
Robin Ward 17ebfd1715 FIX: Don't show suggested messages if private messages are disabled 2018-01-23 12:05:44 -05:00
Guo Xiang Tan 385372e384 Revert "PERF: Reduce number of topics to filter while querying for unread."
This reverts commit c06b782cab.
2017-11-20 11:49:09 +08:00
Neil Lalonde 87ec11e298 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
Guo Xiang Tan c06b782cab PERF: Reduce number of topics to filter while querying for unread. 2017-09-26 12:36:52 +08:00
Guo Xiang Tan 77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Guo Xiang Tan 1a9762a9c0 Fixed private group messages being exposed in suggested topics.
Revert "Revert "PERF: Avoid unnecessary expensive joins if possible.""

This reverts commit d9714c21c8.
2017-09-15 23:40:53 +08:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Bianca Nenciu 1c917cc391 Added test. 2017-07-11 13:59:37 -04:00
Vinoth Kannan 1241660c2c FIX: 'read' filter in top menu showing new topics 2017-04-29 14:37:45 +05:30
Sam 74d4209d24 FEATURE: allow plugins to register custom topic list filters 2017-02-15 15:25:43 -05:00
Sam c04d4171ff FIX: whisper no longer experimental
- Regular users are not notified of whispers
- Regular users no longer have "stuck" topics in unread
- Additional tracking for staff highest post number
- Remove a bunch of unused columns in topics table
2016-12-02 17:03:31 +11:00
Guo Xiang Tan 95c6e97587 Ensure we don't run `$redis.keys` in production. 2016-11-15 23:23:41 +08:00
Neil Lalonde 9ef1688a76 FEATURE: per-category default topic list sort order 2016-11-01 12:18:41 -04:00
James Kiesel 554d15fdd4 Add extra spec for topic_query 2016-08-15 15:42:06 -04:00
James Kiesel 7e73b933c7 First pass 2016-08-12 15:28:46 -04:00
Neil Lalonde f10c4682cd FIX: muted tags showing in latest topic list 2016-08-04 11:54:48 -04:00
Neil Lalonde 7c092b0fe0 FEATURE: add filter to show topics that have not been tagged 2016-07-20 16:21:51 -04:00
Sam 92daf44daf correct random suggested topic selection 2016-07-04 10:34:54 +10:00
Guo Xiang Tan cb5be1fe8f
Upgrade rspec to 3.4.0. 2016-05-30 11:38:38 +08:00
Neil Lalonde 884779b5c1 FIX: N+1 query when tagging enabled and no tags in topic list query. Topic query ignored tags input when tagging is disabled. 2016-05-26 18:03:50 -04:00
Neil Lalonde f13470b96b Use db schema for tags instead of plugin store and custom fields 2016-05-26 14:29:48 -04:00
Guo Xiang Tan 96f07053b2
FIX: Ensure unique fields in `TopicList.preloaded_custom_fields`. 2016-05-16 17:56:00 +08:00
Joe Buhlig 8d6579c729 Added ability to create topic sorts in plugins with custom_fields 2016-03-04 11:07:39 -06:00
Sam f0e942f647 PERF: move 3 more option columns out of the user table 2016-02-18 16:57:22 +11:00
Sam Saffron bc75010b20 FEATURE: suggested messages for messages
FEATURE: clicking envelope takes you to inbox

Suggested messages works somewhat like suggested topics.

- New show up first (in either group inbox or inbox)
- Then unread (in either group inbox or inbox)
- Finally "related" which are messages with same participants as the current pm.
2016-02-03 18:50:05 +11:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam 48ef609003 correct implementation add tests 2015-11-02 15:05:08 +11:00
Sam a51386a280 FEATURE: allow efficient preloading of custom fields in topic list 2015-08-05 16:09:21 +10:00
Sam 2876725e1b REFACTOR: remove hacky search from discovery 2015-07-27 16:47:06 +10:00
Sam 41e427bd2e Work in progress, full page search 2015-06-22 18:09:08 +10:00
Robin Ward ff3e1e1dd7 FIX: User's topic lists weren't consistent WRT visibility 2015-03-23 18:13:06 -04:00
Sam 12d59d13a7 stop randomly failing here 2015-03-12 13:44:13 +11:00
Sam a26853c1a4 try to work around caching bug in spec 2015-03-05 17:47:34 +11:00
Sam f432b9f5b7 correct spec failure, only test code was affected 2015-03-03 10:21:01 +11:00
Sam 474c947427 temporarily disable test while debugging 2015-03-03 09:51:10 +11:00
Sam 336c15672a clear cache to fix spec 2015-03-03 08:27:27 +11:00
Sam ea40dd08e6 correct tests 2015-02-27 09:41:08 +11:00
Sam 9ca61efa97 correct test 2015-02-25 18:09:45 +11:00
Sam 7b6e85cb6c remove unused api call
correct spec
2015-02-25 14:39:50 +11:00
Luciano Sousa 0fd98b56d8 few components with rspec3 syntax 2015-01-09 13:34:37 -03:00
Robin Ward 114cc1c851 FIX: We missed some references to `/category/xyz` in the ruby code base. 2015-01-07 11:47:01 -05:00
Sam ea87f5fd8a FEATURE: support for filter=bookmarked and filter=liked in topic list 2015-01-07 18:20:10 +11:00
Sam efc717c14a FEATURE: remove star concept from Discourse 2015-01-07 13:43:27 +11:00
cpradio 0d6e5470d4 FEATURE: Add ?status=deleted querystring
Add tests around the ?status=deleted querystring
2014-11-20 10:32:33 -05:00
Robin Ward 1f26a79899 FIX: Category latest pages were not preloading properly, causing weird
refreshes when clicking the home logo.
2014-10-08 12:45:18 -04:00
Régis Hanol de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00
Konrad Borowski 3189296e5f
Fix ordering of posts in posts in order unit test. 2014-08-12 10:31:21 +02:00
Konrad Borowski 3e5ff66bed
Add unit tests for testing if infinity as highest_date works. 2014-08-12 09:51:54 +02:00