18 lines
456 B
Go
18 lines
456 B
Go
package repository
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestRegistrationIDPrefix(t *testing.T) {
|
|
registrationDate := time.Date(2026, time.September, 7, 0, 0, 0, 0, time.UTC)
|
|
|
|
if got, want := registrationIDPrefix(2, registrationDate), "MCU2609"; got != want {
|
|
t.Fatalf("MCU prefix = %q; want %q", got, want)
|
|
}
|
|
if got, want := registrationIDPrefix(1, registrationDate), "P2609"; got != want {
|
|
t.Fatalf("regular prefix = %q; want %q", got, want)
|
|
}
|
|
}
|