feat: add ticket domain models
This commit is contained in:
12
backend/apps/tickets/tests/test_ticket_status.py
Normal file
12
backend/apps/tickets/tests/test_ticket_status.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import pytest
|
||||
|
||||
from apps.tickets.services import TicketStatusError, validate_status_transition
|
||||
|
||||
|
||||
def test_pending_ticket_can_move_to_in_progress():
|
||||
validate_status_transition("pending", "in_progress")
|
||||
|
||||
|
||||
def test_resolved_ticket_cannot_move_back_to_in_progress():
|
||||
with pytest.raises(TicketStatusError, match="resolved -> in_progress"):
|
||||
validate_status_transition("resolved", "in_progress")
|
||||
Reference in New Issue
Block a user