test: add comprehensive tests for notes and highlights
- Add complete test suite for media notes API with validation - Add complete test suite for media highlights API with color validation - Add backward compatibility tests for ebook endpoints - Test authentication scenarios (unauthorized access) - Test request validation and error handling - Fix existing test import issues and syntax errors - Add test cases for highlight-note associations
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAuthMiddleware(t *testing.T) {
|
||||
func TestAuthMiddlewareAlt(t *testing.T) {
|
||||
// Test missing JWT header
|
||||
t.Run("Missing JWT", func(t *testing.T) {
|
||||
req := httptest.NewRequest("GET", "/api/libraries/visible", nil)
|
||||
|
||||
Reference in New Issue
Block a user