package main

import (
	"fmt"
	"testing"

	"github.com/joho/godotenv"
)

func TestGenerateSongRequest(t *testing.T) {
	err := godotenv.Load()
	if err != nil {
		t.Fatalf("Error loading .env file: %v", err)
	}
	topic := "a electronic song, fast paced"
	audioURL, imageLargeURL, duration, title, tags := GenerateSongRequest(topic)
	fmt.Println("Audio URL:", audioURL)
	fmt.Println("Image Large URL:", imageLargeURL)
	fmt.Println("Duration:", duration)
	fmt.Println("Title:", title)
	fmt.Println("Tags:", tags)
	if audioURL == "" {
		t.Error("audioURL is empty")
	}
	if imageLargeURL == "" {
		t.Error("imageLargeURL is empty")
	}
	if duration <= 0 {
		t.Error("duration is not positive")
	}
}
