mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 18:17:03 +00:00
Logging and unit test changes
Logging methods were renamed so they don't trigger go-vet warnings for error() and Error() formatting. Unit tests were updated to use new github.com/stretchr repo (was renamed from stretchrcom) Missing methods were added to Message mock object.
This commit is contained in:
@@ -3,7 +3,8 @@ package smtpd
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/jhillyerd/go.enmime"
|
||||
"github.com/stretchrcom/testify/mock"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"io"
|
||||
"net/mail"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -141,6 +142,16 @@ func (m *MockMessage) ReadRaw() (raw *string, err error) {
|
||||
return args.Get(0).(*string), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockMessage) RawReader() (reader io.ReadCloser, err error) {
|
||||
args := m.Called()
|
||||
return args.Get(0).(io.ReadCloser), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockMessage) Size() (int64) {
|
||||
args := m.Called()
|
||||
return int64(args.Int(0))
|
||||
}
|
||||
|
||||
func (m *MockMessage) Append(data []byte) error {
|
||||
args := m.Called(data)
|
||||
return args.Error(0)
|
||||
|
||||
Reference in New Issue
Block a user