Commit 045aaf4
Fix push notification delivery crashing on send (#71)
ItemTagNotifier's action_push_native config omitted the with_apple,
with_google, and with_data options. Noticed's delivery method passes
each to ActionPushNative, which does {}.merge(option) and raises
TypeError (no implicit conversion of nil into Hash) when the option is
nil. Provide the options (empty hashes for apple/google, the url payload
for data), matching Noticed's canonical config.
That crash masked a second bug: url referenced
api_v1_shopkeeper_shop_item_tag_path, which does not exist because
item_tags is declared shallow. Use the shallow helper
api_v1_shopkeeper_item_tag_path.
Existing tests only enqueued the notification and never performed the
delivery job, so neither bug surfaced. Add a test that performs the
delivery (excluding the real APNs/FCM send job) plus a test pinning the
url to the shallow route.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent dcbc533 commit 045aaf4
2 files changed
Lines changed: 27 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
33 | 55 | | |
0 commit comments