Add application workflow and lead analytics
This commit is contained in:
@@ -118,4 +118,18 @@ func TestMergeCapture(t *testing.T) {
|
||||
t.Fatalf("the same note was appended twice: %q", *app.Notes)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("structured metadata is filled without overwriting corrections", func(t *testing.T) {
|
||||
app := models.JobApplication{Status: "applied", SalaryRange: strPtr("£50k")}
|
||||
in := JobCaptureInput{SalaryRange: "£70k", WorkArrangement: "Hybrid", ApplicationSource: "LinkedIn", ResumeVersion: "CV-1", RequisitionID: "REQ-9"}
|
||||
if !MergeCapture(&app, in, now) {
|
||||
t.Fatal("expected metadata to be added")
|
||||
}
|
||||
if *app.SalaryRange != "£50k" || *app.WorkArrangement != "Hybrid" || *app.ApplicationSource != "LinkedIn" || *app.ResumeVersion != "CV-1" || *app.RequisitionID != "REQ-9" {
|
||||
t.Fatalf("metadata merge = %+v", app)
|
||||
}
|
||||
if MergeCapture(&app, in, now) {
|
||||
t.Fatal("same metadata should not cause another change")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user