Replace UUID-looking sync labels in TUI and web with keys like TAS-1, while keeping the remote UUID for task-master matching. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
358 B
Go
16 lines
358 B
Go
package ticket
|
|
|
|
import "testing"
|
|
|
|
func TestDisplayID(t *testing.T) {
|
|
if got := (Ticket{Key: "TAS-1", ExternalID: "uuid"}).DisplayID(); got != "TAS-1" {
|
|
t.Fatalf("got %q", got)
|
|
}
|
|
if got := (Ticket{ExternalID: "YT-9"}).DisplayID(); got != "YT-9" {
|
|
t.Fatalf("got %q", got)
|
|
}
|
|
if got := (Ticket{}).DisplayID(); got != "" {
|
|
t.Fatalf("got %q", got)
|
|
}
|
|
}
|