Debian Codegraph @

testing/integration/ntfy/send_test.go

raw symbols SCIP
1 package ntfy_testscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/
2
3 import (
4 "stringsscip-go gomod github.com/golang/go/src . strings/"
5 "testingscip-go gomod github.com/golang/go/src . testing/"
6 "testing/synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/"
7
8 "github.com/stretchr/testify/requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/"
9 )
10
11 func TestSendBasicMessagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendBasicMessage().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
12 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
13 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
14 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
15 t,
16 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
17 )
18
19 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Hello from ntfy integration test", nil)
20 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
21
22 assertRequestContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestContains().(t, mockClient, "Hello from ntfy integration test")
23 assertRequestMadescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestMade().(t, mockClient, service.Configscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Config..GetAPIURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Config#GetAPIURL().())
24
25 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
26 })
27 }
28
29 func TestSendEmptyMessagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendEmptyMessage().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
30 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
31 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
32 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
33 t,
34 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
35 )
36
37 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("", nil)
38 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
39
40 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
41 })
42 }
43
44 func TestSendWithTitlescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithTitle().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
45 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
46 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
47 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
48 t,
49 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
50 )
51
52 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("title", "Alert")
53 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Something happened", params)
54
55 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
56 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Title", "Alert")
57
58 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
59 })
60 }
61
62 func TestSendWithPriorityscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithPriority().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
63 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
64 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
65 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
66 t,
67 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
68 )
69
70 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("priority", "High")
71 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Important message", params)
72
73 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
74 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Priority", "High")
75
76 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
77 })
78 }
79
80 func TestSendWithTagsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithTags().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
81 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
82 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
83 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
84 t,
85 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
86 )
87
88 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("tags", "warning,skull")
89 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Tagged message", params)
90
91 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
92 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Tags", "warning,skull")
93
94 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
95 })
96 }
97
98 func TestSendWithMarkdownscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithMarkdown().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
99 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
100 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
101 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
102 t,
103 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.+"?markdown=yes",
104 )
105
106 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("**bold** text", nil)
107 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
108
109 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
110 })
111 }
112
113 func TestSendWithClickscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithClick().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
114 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
115 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
116 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
117 t,
118 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
119 )
120
121 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("click", "https://example.com")
122 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Click me", params)
123
124 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
125 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Click", "https://example.com")
126
127 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
128 })
129 }
130
131 func TestSendWithAttachscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithAttach().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
132 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
133 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
134 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
135 t,
136 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
137 )
138
139 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("attach", "https://example.com/image.png")
140 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Check this out", params)
141
142 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
143 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Attach", "https://example.com/image.png")
144
145 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
146 })
147 }
148
149 func TestSendWithActionsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithActions().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
150 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
151 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
152 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
153 t,
154 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
155 )
156
157 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("actions", "view;open")
158 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Action message", params)
159
160 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
161 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Actions", "view;open")
162
163 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
164 })
165 }
166
167 func TestSendWithDelayscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithDelay().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
168 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
169 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
170 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
171 t,
172 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
173 )
174
175 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("delay", "2h")
176 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Delayed message", params)
177
178 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
179 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Delay", "2h")
180
181 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
182 })
183 }
184
185 func TestSendWithEmailscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithEmail().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
186 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
187 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
188 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
189 t,
190 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
191 )
192
193 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("email", "[email protected]")
194 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Email notification", params)
195
196 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
197 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Email", "[email protected]")
198
199 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
200 })
201 }
202
203 func TestSendWithCacheDisabledscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithCacheDisabled().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
204 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
205 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
206 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
207 t,
208 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.+"?cache=no",
209 )
210
211 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("No cache", nil)
212 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
213 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Cache", "no")
214
215 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
216 })
217 }
218
219 func TestSendWithFirebaseDisabledscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithFirebaseDisabled().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
220 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
221 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
222 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
223 t,
224 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.+"?firebase=no",
225 )
226
227 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("No firebase", nil)
228 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
229 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Firebase", "no")
230
231 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
232 })
233 }
234
235 func TestSendWithBasicAuthscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithBasicAuth().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
236 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
237 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
238 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
239 t,
240 "ntfy://user:[email protected]/mytopic",
241 )
242
243 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Authenticated message", nil)
244 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
245 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Authorization", "Basic ")
246
247 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
248 })
249 }
250
251 func TestSendWithUnicodeMessagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithUnicodeMessage().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
252 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
253 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
254 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
255 t,
256 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
257 )
258
259 message := "Hello 世界 🌍"
260 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().(message, nil)
261 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
262
263 assertRequestContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestContains().(t, mockClient, message)
264
265 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
266 })
267 }
268
269 func TestSendWithIconscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithIcon().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
270 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
271 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
272 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
273 t,
274 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
275 )
276
277 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("icon", "https://example.com/icon.png")
278 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("With icon", params)
279
280 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
281 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "X-Icon", "https://example.com/icon.png")
282
283 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
284 })
285 }
286
287 func TestSendWithFilenamescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithFilename().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
288 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
289 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
290 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
291 t,
292 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
293 )
294
295 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("filename", "report.pdf")
296 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Here is the report", params)
297
298 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
299 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Filename", "report.pdf")
300
301 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
302 })
303 }
304
305 func TestSendWithMultipleTagsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithMultipleTags().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
306 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
307 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
308 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
309 t,
310 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
311 )
312
313 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("tags", "warning,skull,fire")
314 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Tagged message", params)
315
316 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
317 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Tags", "warning,skull,fire")
318
319 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
320 })
321 }
322
323 func TestSendWithMultipleActionsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithMultipleActions().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
324 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
325 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
326 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
327 t,
328 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
329 )
330
331 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().("actions", "view;open;reply")
332 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Action message", params)
333
334 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
335 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Actions", "view;open;reply")
336
337 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
338 })
339 }
340
341 func TestSendWithCombinedParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithCombinedParams().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
342 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
343 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
344 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
345 t,
346 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
347 )
348
349 params := createTestParamsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestParams().(
350 "title", "Combined",
351 "priority", "High",
352 "tags", "warning,skull",
353 )
354 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Combined message", params)
355
356 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
357 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Title", "Combined")
358 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Priority", "High")
359 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Tags", "warning,skull")
360
361 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
362 })
363 }
364
365 func TestSendWithTitleViaURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithTitleViaURL().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
366 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
367 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
368 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
369 t,
370 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.+"?title=URLTitle",
371 )
372
373 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Message body", nil)
374 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
375 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Title", "URLTitle")
376
377 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
378 })
379 }
380
381 func TestSendWithPriorityViaURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithPriorityViaURL().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
382 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
383 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
384 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
385 t,
386 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.+"?priority=Max",
387 )
388
389 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Important", nil)
390 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
391 assertRequestHeaderContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestHeaderContains().(t, mockClient, "Priority", "Max")
392
393 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
394 })
395 }
396
397 func TestSendWithSpecialCharactersscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithSpecialCharacters().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
398 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
399 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
400 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
401 t,
402 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
403 )
404
405 message := "Special: <>@#$%^&*()"
406 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().(message, nil)
407 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
408
409 assertRequestContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestContains().(t, mockClient, message)
410
411 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
412 })
413 }
414
415 func TestSendWithNewlinesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithNewlines().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
416 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
417 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
418 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
419 t,
420 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
421 )
422
423 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("Line 1\nLine 2\nLine 3", nil)
424 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
425 assertRequestContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestContains().(t, mockClient, "Line 1\nLine 2\nLine 3")
426
427 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
428 })
429 }
430
431 func TestSendWithLongMessagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithLongMessage().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
432 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
433 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
434 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
435 t,
436 validNtfyURLscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/validNtfyURL.,
437 )
438
439 longMessage := stringsscip-go gomod github.com/golang/go/src . strings/.Repeatscip-go gomod github.com/golang/go/src . strings/Repeat().("a", 10000)
440 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().(longMessage, nil)
441 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
442 assertRequestContainsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/assertRequestContains().(t, mockClient, longMessage)
443
444 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
445 })
446 }
447
448 func TestSendWithDisableTLSVerificationscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/TestSendWithDisableTLSVerification().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
449 t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().()
450 synctestscip-go gomod github.com/golang/go/src . `testing/synctest`/.Testscip-go gomod github.com/golang/go/src . `testing/synctest`/Test().(t, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) {
451 service, mockClient := createTestServiceWithMockscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/testing/integration/ntfy_test`/createTestServiceWithMock().(
452 t,
453 "ntfy://ntfy.example.com/mytopic?disabletlsverification=yes",
454 )
455
456 err := service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services/push/ntfy`/Service#Send().("test", nil)
457 requirescip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/require`/NoError().(t, err)
458
459 mockClient.AssertExpectationsscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/mock`/Mock#AssertExpectations().(t)
460 })
461 }