mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-30 10:25:40 +02:00
Self-review
This commit is contained in:
parent
79a3259c86
commit
ac029c389e
16 changed files with 201 additions and 133 deletions
server
|
@ -1190,7 +1190,20 @@ func TestServer_PublishDelayedEmail_Fail(t *testing.T) {
|
|||
"E-Mail": "test@example.com",
|
||||
"Delay": "20 min",
|
||||
})
|
||||
require.Equal(t, 400, response.Code)
|
||||
require.Equal(t, 40003, toHTTPError(t, response.Body.String()).Code)
|
||||
}
|
||||
|
||||
func TestServer_PublishDelayedCall_Fail(t *testing.T) {
|
||||
c := newTestConfig(t)
|
||||
c.TwilioAccount = "AC1234567890"
|
||||
c.TwilioAuthToken = "AAEAA1234567890"
|
||||
c.TwilioFromNumber = "+1234567890"
|
||||
s := newTestServer(t, c)
|
||||
response := request(t, s, "PUT", "/mytopic", "fail", map[string]string{
|
||||
"Call": "yes",
|
||||
"Delay": "20 min",
|
||||
})
|
||||
require.Equal(t, 40037, toHTTPError(t, response.Body.String()).Code)
|
||||
}
|
||||
|
||||
func TestServer_PublishEmailNoMailer_Fail(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue