package queue

import (
	"context"
	"testing"

	"go.uber.org/zap"
)

func TestEnqueueTaskRejectsPreSerializedBytesBeforeQueueAccess(t *testing.T) {
	t.Parallel()

	client := &Client{logger: zap.NewNop()}
	if err := client.EnqueueTask(context.Background(), "test:bytes", []byte(`{"task_id":1}`)); err == nil {
		t.Fatal("预序列化 []byte 载荷必须在访问 Asynq 前被拒绝")
	}
}
