ae8dbbb
test(disco-info): gateway returns gateway identity
Phillip Davis created
ae8dbbb
test(disco-info): gateway returns gateway identity
Phillip Davis created
5a5ba62
test(disco-info): user node returns user caps
Phillip Davis created
7dbe844
refactor: process_stanza -> test_helper
Phillip Davis created
4b389bb
refactor: xmpp_error_{text,name} -> test_helper
Phillip Davis created
c1d4d3a
refactor: move `invoke_webhook` to test_helper
Phillip Davis created
aa2d836
test(webhook): nil text with media, empty body
Phillip Davis created
91096d5
test(webhook): empty to returns 400
Phillip Davis created
4ee797e
test(webhook): non-array to returns 400
Phillip Davis created
a437bc2
test(webhook): missing message/type returns 400
Phillip Davis created
b40e75e
test(webhook): non-POST method produces no output
Phillip Davis created
5de9ba4
test(webhook): non-root URI produces no output
Phillip Davis created
f61d47d
test(webhook): empty params produces no output
Phillip Davis created
1ab0958
test(webhook): unknown type sends notification
Phillip Davis created
a8c44ff
test(webhook): empty text no media returns 400
Phillip Davis created
cd4762e
test(webhook): resend emits stream event
Phillip Davis created
7cfd167
test(webhook): received emits stream event
Phillip Davis created
73a8a95
test(webhook): failed emits correct stream event
Phillip Davis created
2d25c26
test(webhook): delivered stream event
Phillip Davis created
76eadf1
test(webhook): unknown dir failed returns 400
Phillip Davis created
4b00d69
test(webhook): unknown dir non-failed returns 400
Phillip Davis created
b421077
test(webhook): unknown outbound returns 200
Phillip Davis created
95a2e54
test(webhook): outbound unregistered returns 403
Phillip Davis created
7b11bf0
test(webhook): failure sends one error
Phillip Davis created
8c4a9ba
test(webhook): multi-to outbound no receipts
Phillip Davis created
d2f3b02
test(webhook): delivery sends one receipt
Phillip Davis created
36cd02e
refactor: move common setup code to test_helper
Phillip Davis created
d13029c
test: groundwork for property tests
- some extra generators for domain-specific data like NANPA-compliant phone numbers, Bandwidth media URLs, and JIDs (could be better, but nobody's perfect) - Rake test tasks split into `unit` and `property` (existing `test` target runs both and is still the default) - `property` target picks a random seed, then uses that seed to set `--seed=` (for minitest) and `srand` (for rantly). downside: you can only seed a whole test, you can rerun just one property with the same generated input. sad. - `rake property` will, by default, collect failing seeds into `test/stubs`
Phillip Davis created
5803d8e
fix: REALLY set ARGV[0] in all tests
turns out you need to set it in both test_helper and in em - sgx_bwmsgsv2 references ARGV[0], so must set it before requiring - but each test runs in its own fiber, and fibers don't share ARGV
Phillip Davis created
a1960e5
fix: require 'delegate'
fails, at least under ruby 3, without this
Phillip Davis created
93eae50
test(webhook): nil text with no media returns 400
Phillip Davis created
112b8da
fix(webhook): reject empty body with no media
When text is empty/nil and there is no media, return 400 instead of falling through to message construction with nil text.
Phillip Davis created
1ebdee3
test(webhook): single recipient with media stanza
Phillip Davis created
13a2150
test(webhook): group stanza has addresses element
Phillip Davis created
195e838
fix(webhook): reject empty recipients with 400
When jparams['to'] is an empty array, return 400 instead of falling through to message construction.
Phillip Davis created
7315bef
test(webhook): single recipient text stanza shape
Phillip Davis created
d8115f1
test(webhook): unregistered JID writes no stanza
When the webhook references a phone number with no Redis JID mapping, the handler returns 403 and writes no XMPP stanza.
Phillip Davis created
3ec27f7
test(webhook): empty params writes no stanza
Phillip Davis created
0344971
refactor: put webhook tests in their own file
Phillip Davis created
0ade5d1
apply-hotfix: amend msg fallback logic
Phillip Davis created
7e4ceb6
apply-hotfix: early exit for some inbound
Phillip Davis created
c4a5a62
apply-hotfix: dont add empty text bodies
Phillip Davis created
628ed0d
apply-hotfix: relocate deduplication of group msgs
Phillip Davis created
3dfa8c7
apply-hotfix: shuffle handling of message-failed
this does not change any functionality, it removes a case where we initially lie about which values is `others_num`
Phillip Davis created
e9249f4
remove inactive `case jparams['type']` branches
these types do not exist in V2, which can be verified either by the reading the bandwidth docs here[0] or by reading the commit message of cd6e0df [0]: https://dev.bandwidth.com/docs/messaging/webhooks/#inbound-message-webhooks
Phillip Davis created
46e6b93
remove pry-stack_explorer
pry-byebug explicitly says that pry-stack_explorer is incompatible
Phillip Davis created
d16f235
enhancement: -j/--json flag
Phillip Davis created
782205a
backport: dont run handlers after message :error?
Phillip Davis created
e5254af
Merge branch 'emit-resends-as-resends' of https://git.secluded.site/sgx-bwmsgsv2
* 'emit-resends-as-resends' of https://git.secluded.site/sgx-bwmsgsv2: Emit ResendIn event when replaying inbound messages
Stephen Paul Weber created
0d3b089
Merge branch 'incorporate-first-round-of-hotfixes' of https://git.secluded.site/sgx-bwmsgsv2
* 'incorporate-first-round-of-hotfixes' of https://git.secluded.site/sgx-bwmsgsv2: fix: make sure ARGV[0] is set for all tests fix: don't call `from=` on StanzaError fix: Message::Base.media_urls is always an array fix: correct for dedup in message event fix: webhook tests need to stub component's `write` fix: webhooks expect top-level 'to' fix: response_handler wants unescaped strings fix: don't stop reactor if test
Stephen Paul Weber created
d5b108f
Add event viewer script
Amolith created