mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:51:14 -05:00
Fix test parameter mismatches
Correct parameter names in integration tests to resolve TypeScript errors. The errors indicate a mismatch between expected and actual parameter names (`p_user_id` vs `_user_id`) in Supabase-generated types, which are now being aligned.
This commit is contained in:
@@ -98,7 +98,7 @@ export const authTestSuite: TestSuite = {
|
||||
|
||||
// Test is_superuser() database function
|
||||
const { data: isSuper, error: superError } = await supabase
|
||||
.rpc('is_superuser', { p_user_id: user.id });
|
||||
.rpc('is_superuser', { _user_id: user.id });
|
||||
|
||||
if (superError) throw new Error(`is_superuser() failed: ${superError.message}`);
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ export const edgeFunctionTestSuite: TestSuite = {
|
||||
// Call the ban check function
|
||||
const { data: isBanned, error: banError } = await supabase
|
||||
.rpc('is_user_banned', {
|
||||
_user_id: userData.user.id
|
||||
p_user_id: userData.user.id
|
||||
});
|
||||
|
||||
if (banError) throw new Error(`Ban check failed: ${banError.message}`);
|
||||
|
||||
Reference in New Issue
Block a user