1
0
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:
James Hillyerd
2018-03-13 22:00:44 -07:00
parent 9be4eec31c
commit 2cc0da3093
10 changed files with 208 additions and 208 deletions

View File

@@ -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)