Add MCU prefix for MCU registrations
This commit is contained in:
17
internal/repository/registration_prefix_test.go
Normal file
17
internal/repository/registration_prefix_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user