mirror of https://github.com/jlelse/GoBlog
Fix test
parent
2f8dabc83e
commit
56358fff4e
|
@ -7,6 +7,7 @@ import (
|
|||
"net/url"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -58,6 +59,9 @@ func Test_contact(t *testing.T) {
|
|||
app.sendContactSubmission(rec, req.WithContext(context.WithValue(req.Context(), blogKey, "en")))
|
||||
require.Equal(t, http.StatusOK, rec.Code)
|
||||
|
||||
// Wait a second
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
// Check sent mail
|
||||
assert.Contains(t, rd.Usernames, "user")
|
||||
assert.Contains(t, rd.Passwords, "pass")
|
||||
|
|
Loading…
Reference in New Issue