# This file is auto-generated by oagen. Do not edit.

"""Model round-trip tests: from_dict(to_dict()) preserves data."""

from tests.generated_helpers import load_fixture

from workos.admin_portal.models import PortalLinkResponse


class TestModelRoundTrip:
    def test_portal_link_response_round_trip(self):
        data = load_fixture("portal_link_response.json")
        instance = PortalLinkResponse.from_dict(data)
        serialized = instance.to_dict()
        assert serialized == data
        restored = PortalLinkResponse.from_dict(serialized)
        assert restored.to_dict() == serialized

    def test_portal_link_response_minimal_payload(self):
        data = {
            "link": "https://setup.workos.com?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
        }
        instance = PortalLinkResponse.from_dict(data)
        serialized = instance.to_dict()
        assert serialized["link"] == data["link"]
