@@ -132,9 +132,6 @@ func TestHandler_Smtp(t *testing.T) {
132132 app : func () * runtime.App {
133133 app := runtime .New (& static.Config {})
134134 app .Mail .Set ("foo" , & runtime.MailInfo {
135- Config : & mail.Config {
136- Info : mail.Info {Name : "foo" },
137- },
138135 Store : & mail.Store {
139136 Mailboxes : map [string ]* mail.Mailbox {
140137 "[email protected] " : {
Username :
"alice" ,
Password :
"foo" },
@@ -157,9 +154,6 @@ func TestHandler_Smtp(t *testing.T) {
157154 app : func () * runtime.App {
158155 app := runtime .New (& static.Config {})
159156 app .Mail .Set ("foo" , & runtime.MailInfo {
160- Config : & mail.Config {
161- Info : mail.Info {Name : "foo" },
162- },
163157 Store : & mail.Store {
164158 Mailboxes : map [string ]* mail.Mailbox {
165159@@ -181,9 +175,6 @@ func TestHandler_Smtp(t *testing.T) {
181175 app : func () * runtime.App {
182176 app := runtime .New (& static.Config {})
183177 app .Mail .Set ("foo" , & runtime.MailInfo {
184- Config : & mail.Config {
185- Info : mail.Info {Name : "foo" },
186- },
187178 Store : & mail.Store {
188179 Mailboxes : map [string ]* mail.Mailbox {
189180@@ -219,9 +210,6 @@ func TestHandler_Smtp(t *testing.T) {
219210 app : func () * runtime.App {
220211 app := runtime .New (& static.Config {})
221212 app .Mail .Set ("foo" , & runtime.MailInfo {
222- Config : & mail.Config {
223- Info : mail.Info {Name : "foo" },
224- },
225213 Store : & mail.Store {
226214 Mailboxes : map [string ]* mail.Mailbox {
227215@@ -268,10 +256,9 @@ func TestHandler_Smtp(t *testing.T) {
268256 app : func () * runtime.App {
269257 app := runtime .New (& static.Config {})
270258 app .Mail .Set ("foo" , & runtime.MailInfo {
271- Config : & mail.Config {
272- Info : mail.Info {Name : "foo" },
273- },
259+ Config : & mail.Config {},
274260 Store : & mail.Store {
261+ Name : "foo" ,
275262 Mailboxes : map [string ]* mail.Mailbox {
276263277264 Folders : map [string ]* mail.Folder {
@@ -301,16 +288,13 @@ func TestHandler_Smtp(t *testing.T) {
301288 },
302289 requestUrl :
"http://foo.api/api/services/mail/messages/[email protected] " ,
303290 contentType : "application/json" ,
304- responseBody :
fmt .
Sprintf (
`{"from":[{"address":"[email protected] "}],"to":[{"address":"[email protected] "}],"messageId":"[email protected] ","date":"%v","subject":"Hello Alice","contentType":"text/plain","body":"foobar","size":10}` ,
now .
Format (
time .
RFC3339Nano )),
291+ responseBody :
fmt .
Sprintf (
`{"service":"foo","data":{" from":[{"address":"[email protected] "}],"to":[{"address":"[email protected] "}],"messageId":"[email protected] ","date":"%v","subject":"Hello Alice","contentType":"text/plain","body":"foobar","size":10} }` ,
now .
Format (
time .
RFC3339Nano )),
305292 },
306293 {
307294 name : "get smtp mail attachment content" ,
308295 app : func () * runtime.App {
309296 app := runtime .New (& static.Config {})
310297 app .Mail .Set ("foo" , & runtime.MailInfo {
311- Config : & mail.Config {
312- Info : mail.Info {Name : "foo" },
313- },
314298 Store : & mail.Store {
315299 Mailboxes : map [string ]* mail.Mailbox {
316300
0 commit comments