fix
This commit is contained in:
@@ -194,6 +194,7 @@ func TestHandleV1StartProcessItemsEANReturnsProcessID(t *testing.T) {
|
||||
var envelope struct {
|
||||
Data struct {
|
||||
ProcessID string `json:"process_id"`
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
TotalItems int `json:"total_items"`
|
||||
ProcessedItems int `json:"processed_items"`
|
||||
@@ -205,8 +206,11 @@ func TestHandleV1StartProcessItemsEANReturnsProcessID(t *testing.T) {
|
||||
if envelope.Data.ProcessID != jobID.String() {
|
||||
t.Fatalf("process_id=%q want %s", envelope.Data.ProcessID, jobID)
|
||||
}
|
||||
if envelope.Data.TotalItems != 1 || envelope.Data.ProcessedItems != 1 {
|
||||
t.Fatalf("counts=%+v", envelope.Data)
|
||||
if envelope.Data.Status != "pending" {
|
||||
t.Fatalf("status=%q want pending", envelope.Data.Status)
|
||||
}
|
||||
if envelope.Data.TotalItems != 1 || envelope.Data.ProcessedItems != 0 {
|
||||
t.Fatalf("counts=%+v (processed_items must be 0 on start)", envelope.Data)
|
||||
}
|
||||
if enqueued != jobID {
|
||||
t.Fatalf("enqueued=%s", enqueued)
|
||||
|
||||
Reference in New Issue
Block a user