mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 10:07:02 +00:00
storage: More refactoring for #69
- impl Store.AddMessage - file: Use AddMessage() in tests - smtp: Switch to AddMessage - storage: Remove NewMessage, Append, Close methods
This commit is contained in:
@@ -15,6 +15,12 @@ type MockDataStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AddMessage mock function
|
||||
func (m *MockDataStore) AddMessage(message StoreMessage) (string, error) {
|
||||
args := m.Called(message)
|
||||
return args.String(0), args.Error(1)
|
||||
}
|
||||
|
||||
// GetMessage mock function
|
||||
func (m *MockDataStore) GetMessage(name, id string) (StoreMessage, error) {
|
||||
args := m.Called(name, id)
|
||||
|
||||
Reference in New Issue
Block a user