discourse/spec/integration
Martin Brennan fb83757edb
FIX: Auto close topic from category settings based on topic created_at (#12082)
Previously when inheriting category auto-close settings for a topic, those settings were disrupted if another topic timer was assigned or if a topic was closed then manually re-opened.

This PR makes it so that when a topic is manually re-opened the topic auto-close settings are inherited from the category. However, they will now be based on the topic created_at date. As an example, for a topic with a category auto close hours setting of 72 (3 days):

* Topic was created on 2021-02-15 08:00
* Topic was closed on 2021-02-16 10:00
* Topic was opened again on 2021-02-17 06:00

Now, the topic will inherit the auto close timer again and will close automatically at **2021-02-18 08:00**, which is based on the creation date. If the current date and time is greater than the original auto-close time (e.g. we were at 2021-02-20 13:45) then no auto-close timer is created.

Note, this will not happen if the topic category auto-close setting is "based on last post".
2021-02-17 07:51:39 +10:00
..
api_keys_spec.rb DEV: Introduce plugin API to contribute user api key scopes 2020-10-19 10:40:55 +01:00
category_tag_spec.rb FEATURE: Tag synonyms 2019-12-04 13:33:51 -05:00
content_security_policy_spec.rb FIX: Allow CSP to work correctly for non-default hostnames/schemes (#9180) 2020-03-19 19:54:42 +00:00
email_style_spec.rb FIX: Pluralized translation overrides didn't work for en_US 2020-08-29 00:11:46 +02:00
flags_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
group_spec.rb UX: Include public groups in mentionable groups set (#8516) 2019-12-12 13:13:40 +02:00
invite_only_registration_spec.rb DEV: Use response.parsed_body in specs (#9615) 2020-05-07 17:04:12 +02:00
message_bus_spec.rb SECURITY: Restrict message-bus access on login_required sites 2019-08-14 09:43:12 +01:00
multisite_spec.rb DEV: enables and fixes multisite-spec (#9557) 2020-04-27 20:55:36 +02:00
rate_limiting_spec.rb DEV: Use response.parsed_body in specs (#9615) 2020-05-07 17:04:12 +02:00
same_ip_spammers_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
spam_rules_spec.rb Migrate score settings to use sensitivities 2019-05-24 15:44:24 -04:00
topic_auto_close_spec.rb FIX: Auto close topic from category settings based on topic created_at (#12082) 2021-02-17 07:51:39 +10:00
topic_thumbnail_spec.rb PERF: we don't need to use a huge image to test thumbnails (#11025) 2020-10-27 12:39:52 +11:00
watched_words_spec.rb FIX: If creating a flag for a watched word, include the reason 2020-06-02 11:49:02 -04:00