Index: backend/src/test/resources/application.properties
===================================================================
--- backend/src/test/resources/application.properties	(revision 3ebe47cce61b3bfc1dee2566f7475e378374591e)
+++ backend/src/test/resources/application.properties	(revision 3ebe47cce61b3bfc1dee2566f7475e378374591e)
@@ -0,0 +1,21 @@
+# Test profile: use in-memory DB so tests don't require external Postgres
+
+spring.datasource.url=jdbc:h2:mem:trekr;MODE=PostgreSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=TRUE
+spring.datasource.driver-class-name=org.h2.Driver
+spring.datasource.username=sa
+spring.datasource.password=
+
+spring.jpa.hibernate.ddl-auto=create-drop
+spring.jpa.show-sql=false
+spring.jpa.properties.hibernate.format_sql=true
+spring.jpa.properties.hibernate.default_schema=trekr
+spring.jpa.properties.hibernate.hbm2ddl.create_namespaces=false
+
+# Ensure schema exists before Hibernate runs DDL
+spring.sql.init.mode=always
+
+# JWT secret for tests
+jwt.secret=test-secret-min-32-chars-000000000000
+
+# Keep noise down in tests
+logging.level.org.springframework.security=INFO
Index: backend/src/test/resources/schema.sql
===================================================================
--- backend/src/test/resources/schema.sql	(revision 3ebe47cce61b3bfc1dee2566f7475e378374591e)
+++ backend/src/test/resources/schema.sql	(revision 3ebe47cce61b3bfc1dee2566f7475e378374591e)
@@ -0,0 +1,2 @@
+CREATE SCHEMA IF NOT EXISTS trekr;
+SET SCHEMA trekr;
