2c2ab4e915
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
18 lines
851 B
Go
18 lines
851 B
Go
package lkgateway
|
|
|
|
import "testing"
|
|
|
|
// Код получателя — по ИНН зачисляющего депозитария из справочника M2M, а не из настроек (M2M15 29.09.2026).
|
|
func TestReceiverForByINN(t *testing.T) {
|
|
svc := NewService(Config{DefaultReceiver: "MC0010300000"})
|
|
if got := svc.receiverFor(CreateClaimRequest{ReceivingDepositoryINN: "7702015515"}); got != "MC00314000TR" {
|
|
t.Fatalf("Атон: %s", got)
|
|
}
|
|
if got := svc.receiverFor(CreateClaimRequest{ReceivingDepositoryINN: "0000000000"}); got != "MC0010300000" {
|
|
t.Fatalf("нет в справочнике — из настроек: %s", got)
|
|
}
|
|
if got := svc.receiverFor(CreateClaimRequest{ReceivingDepositoryINN: "7702015515", ReceiverCodeOverride: "MC0012500000"}); got != "MC0012500000" {
|
|
t.Fatalf("явный код: %s", got)
|
|
}
|
|
}
|