feat: add lab package registration endpoint

This commit is contained in:
2026-08-23 21:32:46 +07:00
parent b497012de3
commit 3e5cae4287
9 changed files with 558 additions and 6 deletions

View File

@@ -13,11 +13,12 @@ import (
)
type fakeLabRegistrationRepository struct {
outcome repository.LabRegistrationOutcome
err error
params repository.LabRegistrationParams
addParams repository.AddLabServicesParams
regID string
outcome repository.LabRegistrationOutcome
err error
params repository.LabRegistrationParams
addParams repository.AddLabServicesParams
packageParams repository.AddLabPackageParams
regID string
}
func (f *fakeLabRegistrationRepository) RegisterLab(_ context.Context, params repository.LabRegistrationParams) (repository.LabRegistrationOutcome, error) {
@@ -31,6 +32,12 @@ func (f *fakeLabRegistrationRepository) AddLabServices(_ context.Context, regID
return f.outcome, f.err
}
func (f *fakeLabRegistrationRepository) AddLabPackage(_ context.Context, regID string, params repository.AddLabPackageParams) (repository.LabRegistrationOutcome, error) {
f.regID = regID
f.packageParams = params
return f.outcome, f.err
}
func TestRegisterLabValidPayloadAndResponseParity(t *testing.T) {
doctorID := "DR01"
registrationType := int64(3)