Commit Graph

12 Commits

Author SHA1 Message Date
Vinoth Kannan
15c2755b7b Fix the WebHookPostSerializer spec.
400f79cffc
2019-12-04 23:30:04 +05:30
Ryan Boder
b7ebe574df FEATURE: Add topic and category context to post webhook payload (#8110)
Adds additional fields topic_archetype and category_slug to the post
webhook so that handlers have some context about the post event without
having to call back to the API.

Discussed [here](https://meta.discourse.org/t/webhooks-how-best-to-differentiate-a-pm-from-a-public-post/76363/13).
2019-10-02 11:41:33 +10:00
Daniel Waterworth
e219588142 DEV: Prefabrication (test optimization) (#7414)
* Introduced fab!, a helper that creates database state for a group

It's almost identical to let_it_be, except:

 1. It creates a new object for each test by default,
 2. You can disable it using PREFABRICATION=0
2019-05-07 13:12:20 +10:00
Robin Ward
18d742d334 FIX: Broken spec 2019-05-06 17:09:08 -04:00
Sam Saffron
bcdf5823a0 DEV: correct frozen string and broken spec
This needs to be properly handled so the correct message is raised

1 item was removed from the serializer (avg_time)
2019-05-06 17:31:35 +10:00
Sam Saffron
4ea21fa2d0 DEV: use #frozen_string_literal: true on all spec
This change both speeds up specs (less strings to allocate) and helps catch
cases where methods in Discourse are mutating inputs.

Overall we will be migrating everything to use #frozen_string_literal: true
it will take a while, but this is the first and safest move in this direction
2019-04-30 10:27:42 +10:00
Tarek Khalil
131eba0366 FIX: Hide post replies content for ignored users (#7320) 2019-04-05 16:13:36 +02:00
Tarek Khalil
eb3f15c3e2 FIX: WebhookPostSerializer spec failure 2019-03-06 09:47:31 +00:00
Guo Xiang Tan
60e7b13f59 Trim WebHookPostSerializer further. 2018-05-21 17:29:58 +08:00
Vinoth Kannan
1446753fd2 FIX: Include deleted topics in the post serializer 2018-02-21 14:31:52 +05:30
scossar
22ca5a772d Expect 41 keys in the serializer 2018-01-17 11:48:00 -08:00
Guo Xiang Tan
8b2e3bf5f1 FIX: Topic title should be included in post webhook payload. 2017-04-21 10:04:21 +08:00