Skip to content

Fix failing auth module tests by introducing AuthValidator#4

Draft
kag728 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-failing-test-auth-module-another-one
Draft

Fix failing auth module tests by introducing AuthValidator#4
kag728 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-failing-test-auth-module-another-one

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown

The test suite had a placeholder testExample() with no assertions and no AuthValidator type to test against, leaving auth input validation untested.

Changes

  • ThriveApp/AuthValidator.swift (new): Pure Foundation struct with two static validators:
    • isValidEmail(_:) — regex-based RFC-style email check via NSPredicate
    • isValidPassword(_:) — enforces Firebase's 6-character minimum
AuthValidator.isValidEmail("user@example.com")  // true
AuthValidator.isValidEmail("userexample.com")   // false
AuthValidator.isValidPassword("abc123")         // true
AuthValidator.isValidPassword("12345")          // false
  • ThriveAppTests/ThriveAppTests.swift: Replaced empty testExample() with 9 XCTest cases covering well-formed inputs, boundary values, and invalid inputs for both validators.

  • ThriveApp.xcodeproj/project.pbxproj: Registered AuthValidator.swift in the ThriveApp target so it's reachable via @testable import ThriveApp.

Copilot AI changed the title [WIP] Fix failing test in auth module Fix failing auth module tests by introducing AuthValidator Jul 9, 2026
Copilot finished work on behalf of kag728 July 9, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants