church-api/comprehensive_test.sh
Benjamin Slingo 0c06e159bb Initial commit: Church API Rust implementation
Complete church management system with bulletin management, media processing, live streaming integration, and web interface. Includes authentication, email notifications, database migrations, and comprehensive test suite.
2025-08-19 20:56:41 -04:00

34 lines
1.5 KiB
Bash
Executable file

#!/bin/bash
echo "=== COMPREHENSIVE API TEST ==="
# 1. Test Authentication
echo "1. Testing Authentication..."
TOKEN=$(curl -s -X POST https://api.rockvilletollandsda.church/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "Alright8-Reapply-Shrewdly-Platter-Important-Keenness-Banking-Streak-Tactile"}' \
| jq -r '.success')
echo "Auth: $TOKEN"
# 2. Test Public Endpoints
echo "2. Testing Public Endpoints..."
curl -s https://api.rockvilletollandsda.church/api/events | jq '.success'
curl -s https://api.rockvilletollandsda.church/api/bulletins | jq '.success'
curl -s https://api.rockvilletollandsda.church/api/config | jq '.success'
# 3. Test Admin Endpoints
echo "3. Testing Admin Endpoints..."
TOKEN=$(curl -s -X POST https://api.rockvilletollandsda.church/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "Alright8-Reapply-Shrewdly-Platter-Important-Keenness-Banking-Streak-Tactile"}' \
| jq -r '.data.token')
curl -s -H "Authorization: Bearer $TOKEN" https://api.rockvilletollandsda.church/api/admin/events/pending | jq '.success'
curl -s -H "Authorization: Bearer $TOKEN" https://api.rockvilletollandsda.church/api/admin/config | jq '.success'
# 4. Check for any remaining placeholder text
echo "4. Checking for placeholders..."
PLACEHOLDERS=$(grep -r "implement as needed\|TODO\|Working!\|n/a\|TBA" src/ 2>/dev/null | wc -l)
echo "Placeholder count: $PLACEHOLDERS"
echo "=== TEST COMPLETE ==="