3d18a98
fix: filter_map broke on prod
Phillip Davis created
3d18a98
fix: filter_map broke on prod
Phillip Davis created
7404d81
fix: `.then` and early-return stream events
- previous code used `.then` on a non-promise, which doesn't work on ruby 2.7 - also, early-return case failed to consider resend events, fixed that
Phillip Davis created
b20d069
document control code stripping
Phillip Davis created
39e82dc
test(port-out-pin): invalid format returns error
Phillip Davis created
086cf8e
test(port-out-pin): mismatched pins returns error
Phillip Davis created
603fca5
test(port-out-pin): complete nil pin returns error
Phillip Davis created
d1649c1
test(port-out-pin): complete success sets pin
Phillip Davis created
cc3b889
test(port-out-pin): execute rejects unregistered
Phillip Davis created
4eb32f4
test(port-out-pin): execute returns form
Phillip Davis created
916eab9
test(disco-items): unregistered user gets error
Phillip Davis created
809763b
test(disco-items): ineligible tn shows no commands
Phillip Davis created
dc1564b
test(disco-items): eligible tn shows port-out cmd
Phillip Davis created
03fc2fa
test(disco-info): non-get produces no output
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