discourse/spec
David Taylor 5df815c2ee
FIX: New/unread count after dismissing new topics in a regular category (#8659)
6e1fe22 introduced the possiblity for category_users to have a NULL notification_level, so that we can store `last_seen_at` dates without locking the notification level. At the time, this did not affect the topic-tracking-state query. However, the query changes in f434de2 introduced a slight change in behavior.

Previously, a subquery would look for a category_user with notification_level=mute. f434de2 refactored this to remove the subquery, and inverted some of the logic to suit.

The new query checked for `notification_level <> :muted`. If `notification_level` is NULL, this comparison will return NULL. In this scenario, notification_level=NULL means that we should fall back to the default tracking level (regular), and so we want the expression to resolve as true, not false. There was already a check for the existence of the category_users row, but it did not check for the existence of a NOT NULL notification_level.

This commit amends the expression so that the notification_level will only be compared if it is non-null.
2020-01-06 16:15:24 +00:00
..
components DEV: correct flaky spec 2020-01-06 10:54:18 +11:00
fabricators FIX: correct user serializer user method for extended serializer (#8590) 2019-12-19 09:48:01 -08:00
fixtures FIX: allow underscore in file extension while downloading the uploads. 2020-01-03 10:09:07 +05:30
helpers FIX: parallel spec system needs a dedicated upload folder for each worker. (#8547) 2019-12-18 11:21:57 +05:30
import_export DEV: clean up dependencies in spec 2019-10-02 14:50:54 +10:00
integration UX: Include public groups in mentionable groups set (#8516) 2019-12-12 13:13:40 +02:00
integrity DEV: Update markdown-it from 8.4.1 to 10.0.0 (#8164) 2019-10-08 13:00:22 +02:00
jobs FIX: parallel spec system needs a dedicated upload folder for each worker. (#8547) 2019-12-18 11:21:57 +05:30
lib FIX: Catch error when unknown COSE algorithm is supplied for Security Key (#8649) 2020-01-02 10:14:22 +10:00
mailers DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
models FIX: New/unread count after dismissing new topics in a regular category (#8659) 2020-01-06 16:15:24 +00:00
multisite FIX: parallel spec system needs a dedicated upload folder for each worker. (#8547) 2019-12-18 11:21:57 +05:30
requests FIX: Don't give error 500 when invalid date param is given to admin reports (#8658) 2020-01-03 17:01:38 +03:00
serializers PERF: Reduce DB queries when serializing ignore/mute information (#8629) 2020-01-02 13:04:08 +00:00
services FIX: Allow any protocol in wildcard url checker (#8651) 2020-01-02 16:03:13 +00:00
support DEV: update rubocop to version 0.77 2019-12-10 11:48:39 +11:00
tasks DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb DEV: Check for pending migrations before running rspec suite 2019-12-13 12:50:18 +00:00