package auth

import (
	"testing"
)

func TestGenerateState(t *testing.T) {
	state1, err := GenerateState()
	if err != nil {
		t.Fatal(err)
	}
	state2, err := GenerateState()
	if err != nil {
		t.Fatal(err)
	}
	if state1 == state2 {
		t.Error("States should be unique")
	}
	if len(state1) == 0 {
		t.Error("State should not be empty")
	}
}

func TestNewService(t *testing.T) {
	// Mock db
	// service, err := NewService(cfg, db)
	// TODO: Mock database for full test
	t.Skip("Requires database mock")
}
