Correctly test AMQP job payload `queued_at`
@@ -50,6 +50,7 @@ func newTestAMQPJob(t *testing.T) *amqpJob {
Job: JobJobPayload{
ID: uint64(123),
Number: "1",
+ QueuedAt: new(time.Time),
},
Build: BuildPayload{
ID: uint64(456),
@@ -196,7 +197,7 @@ func TestAMQPJob_createStateUpdateBody(t *testing.T) {
job.received = time.Time{}
assert.NotContains(t, job.createStateUpdateBody("foo"), "received_at")
- job.Payload().Job.QueuedAt = &time.Time{}
+ job.Payload().Job.QueuedAt = nil
assert.NotContains(t, job.createStateUpdateBody("foo"), "queued_at")
job.started = time.Time{}
