feat: Ipad app production readiness, Colony orchestration, Social posting
This commit is contained in:
@@ -108,6 +108,30 @@ def test_canonical_crm_import_upload_requires_authentication() -> None:
|
||||
assert response.json()["detail"] == "Missing or malformed Authorization header."
|
||||
|
||||
|
||||
def test_canonical_crm_vocabularies_require_authentication() -> None:
|
||||
client = _build_app(authenticated=False)
|
||||
|
||||
response = client.get("/api/crm/vocabularies")
|
||||
|
||||
assert response.status_code == 401
|
||||
assert response.json()["detail"] == "Missing or malformed Authorization header."
|
||||
|
||||
|
||||
def test_canonical_crm_vocabularies_are_backend_owned() -> None:
|
||||
client = _build_app(authenticated=True)
|
||||
|
||||
response = client.get("/api/crm/vocabularies")
|
||||
|
||||
assert response.status_code == 200
|
||||
payload = response.json()["data"]
|
||||
assert payload["lead_statuses"][0]["value"] == routes_crm_imports.CANONICAL_LEAD_STAGES[0]
|
||||
assert payload["opportunity_stages"][0]["value"] == routes_crm_imports.CANONICAL_OPPORTUNITY_STAGES[0]
|
||||
assert {policy["value"] for policy in payload["import_duplicate_policies"]} == set(
|
||||
routes_crm_imports.IMPORT_DUPLICATE_POLICIES
|
||||
)
|
||||
assert payload["dream_weaver_room_types"][0]["icon"]
|
||||
|
||||
|
||||
def test_canonical_crm_contacts_can_be_read_when_authenticated(monkeypatch) -> None:
|
||||
client = _build_app(authenticated=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user