package grpc

import (
	"testing"

	userv1 "hyapp.local/api/proto/user/v1"
)

func TestAuthMetaMapsClientVersionSnapshot(t *testing.T) {
	meta := authMeta(&userv1.RequestMeta{
		RequestId:   "req-version",
		AppCode:     "lalu",
		AppVersion:  "2.4.0",
		BuildNumber: "24001",
	})

	// 密码登录没有独立的版本字段，只能依赖 RequestMeta；这里防止 transport 后续新增字段时漏掉审计映射。
	if meta.AppVersion != "2.4.0" || meta.BuildNumber != "24001" {
		t.Fatalf("client version meta mismatch: %+v", meta)
	}
}
