auth google + jwt
This commit is contained in:
22
tests/test_greeting_service.py
Normal file
22
tests/test_greeting_service.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Tests for GreetingService."""
|
||||
|
||||
from app.services.greeting_service import GreetingService
|
||||
|
||||
|
||||
class TestGreetingService:
|
||||
"""Test cases for GreetingService."""
|
||||
|
||||
def test_get_greeting_without_name(self) -> None:
|
||||
"""Test getting greeting without providing a name."""
|
||||
result = GreetingService.get_greeting()
|
||||
assert result == {"message": "Hello from backend!"}
|
||||
|
||||
def test_get_greeting_with_name(self) -> None:
|
||||
"""Test getting greeting with a name."""
|
||||
result = GreetingService.get_greeting("Alice")
|
||||
assert result == {"message": "Hello, Alice!"}
|
||||
|
||||
def test_get_greeting_with_empty_string(self) -> None:
|
||||
"""Test getting greeting with empty string name."""
|
||||
result = GreetingService.get_greeting("")
|
||||
assert result == {"message": "Hello from backend!"}
|
||||
Reference in New Issue
Block a user