Minor cleanup for campaign results

pull/1264/head
Jordan Wright 2018-10-08 10:49:21 -05:00
parent 81da804761
commit d6cbc1a936
2 changed files with 5 additions and 9 deletions

View File

@ -37,7 +37,6 @@ type CampaignResults struct {
Id int64 `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
Reported string `json:"reported"`
Results []Result `json:"results, omitempty"`
Events []Event `json:"timeline,omitempty"`
}

View File

@ -1,7 +1,6 @@
package models
import (
"fmt"
"net/mail"
"regexp"
"time"
@ -69,10 +68,8 @@ func (s *ModelsSuite) TestResultVariableStatus(ch *check.C) {
// emails to be sent immediately, while others will be scheduled
for _, r := range c.Results {
if r.SendDate.Before(c.CreatedDate) || r.SendDate.Equal(c.CreatedDate) {
fmt.Println("SENDING")
ch.Assert(r.Status, check.Equals, STATUS_SENDING)
} else {
fmt.Println("SCHEDULED")
ch.Assert(r.Status, check.Equals, STATUS_SCHEDULED)
}
}