From 8d36aa9750334e825904383e786025d89af14167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Wojtun=CC=81?= Date: Tue, 13 Sep 2016 07:43:33 +0200 Subject: [PATCH] revert webui stuff --- webui/mailbox_controller.go | 3 --- webui/rest_test.go | 20 -------------------- 2 files changed, 23 deletions(-) diff --git a/webui/mailbox_controller.go b/webui/mailbox_controller.go index 6166260..523a5c6 100644 --- a/webui/mailbox_controller.go +++ b/webui/mailbox_controller.go @@ -19,7 +19,6 @@ type JSONMessageHeader struct { Mailbox string ID string `json:"Id"` From string - To string Subject string Date time.Time Size int64 @@ -30,7 +29,6 @@ type JSONMessage struct { Mailbox string ID string `json:"Id"` From string - To string Subject string Date time.Time Size int64 @@ -115,7 +113,6 @@ func MailboxList(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) ( Mailbox: name, ID: msg.ID(), From: msg.From(), - To: msg.To(), Subject: msg.Subject(), Date: msg.Date(), Size: msg.Size(), diff --git a/webui/rest_test.go b/webui/rest_test.go index d35e097..04301b0 100644 --- a/webui/rest_test.go +++ b/webui/rest_test.go @@ -25,7 +25,6 @@ type OutputJSONHeader struct { Mailbox string ID string `json:"Id"` From, Subject, Date string - To string Size int } @@ -34,7 +33,6 @@ type OutputJSONMessage struct { Mailbox string ID string `json:"Id"` From, Subject, Date string - To string Size int Header map[string][]string Body struct { @@ -48,7 +46,6 @@ type InputMessageData struct { Mailbox string ID string `json:"Id"` From, Subject string - To string Date time.Time Size int Header mail.Header @@ -60,7 +57,6 @@ func (d *InputMessageData) MockMessage() *MockMessage { msg := &MockMessage{} msg.On("ID").Return(d.ID) msg.On("From").Return(d.From) - msg.On("To").Return(d.To) msg.On("Subject").Return(d.Subject) msg.On("Date").Return(d.Date) msg.On("Size").Return(d.Size) @@ -89,10 +85,6 @@ func (d *InputMessageData) CompareToJSONHeader(j *OutputJSONHeader) (errors []st errors = append(errors, fmt.Sprintf("Expected JSON.From=%q, got %q", d.From, j.From)) } - if d.To != j.To { - errors = append(errors, fmt.Sprintf("Expected JSON.To=%q, got %q", d.To, - j.To)) - } if d.Subject != j.Subject { errors = append(errors, fmt.Sprintf("Expected JSON.Subject=%q, got %q", d.Subject, j.Subject)) @@ -123,10 +115,6 @@ func (d *InputMessageData) CompareToJSONMessage(j *OutputJSONMessage) (errors [] errors = append(errors, fmt.Sprintf("Expected JSON.From=%q, got %q", d.From, j.From)) } - if d.To != j.To { - errors = append(errors, fmt.Sprintf("Expected JSON.To=%q, got %q", d.To, - j.To)) - } if d.Subject != j.Subject { errors = append(errors, fmt.Sprintf("Expected JSON.Subject=%q, got %q", d.Subject, j.Subject)) @@ -237,7 +225,6 @@ func TestRestMailboxList(t *testing.T) { Mailbox: "good", ID: "0001", From: "from1", - To: "to1", Subject: "subject 1", Date: time.Date(2012, 2, 1, 10, 11, 12, 253, time.FixedZone("PST", -800)), } @@ -245,7 +232,6 @@ func TestRestMailboxList(t *testing.T) { Mailbox: "good", ID: "0002", From: "from2", - To: "to2", Subject: "subject 2", Date: time.Date(2012, 7, 1, 10, 11, 12, 253, time.FixedZone("PDT", -700)), } @@ -359,7 +345,6 @@ func TestRestMessage(t *testing.T) { Mailbox: "good", ID: "0001", From: "from1", - To: "to1", Subject: "subject 1", Date: time.Date(2012, 2, 1, 10, 11, 12, 253, time.FixedZone("PST", -800)), Header: mail.Header{ @@ -493,11 +478,6 @@ func (m *MockMessage) From() string { return args.String(0) } -func (m *MockMessage) To() string { - args := m.Called() - return args.String(0) -} - func (m *MockMessage) Date() time.Time { args := m.Called() return args.Get(0).(time.Time)