diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_invite_link_client.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_invite_link_client.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/meshbay-hub/tests/test_invite_link_client.py b/packages/meshbay-hub/tests/test_invite_link_client.py index 2223ad8..aa8c194 100644 --- a/packages/meshbay-hub/tests/test_invite_link_client.py +++ b/packages/meshbay-hub/tests/test_invite_link_client.py @@ -54,8 +54,8 @@ def _module_body() -> str: def _run(tmp_path, script: str): harness = tmp_path / "h.js" - harness.write_text(script) - out = subprocess.run(["node", str(harness)], capture_output=True, text=True, timeout=60) + harness.write_text(script, encoding="utf-8") + out = subprocess.run(["node", str(harness)], capture_output=True, encoding="utf-8", timeout=60) assert out.returncode == 0, out.stderr return json.loads(out.stdout) @@ -188,7 +188,9 @@ def test_the_members_tab_sends_the_code_only_for_the_mail(): sends = [m.start() for m in re.finditer(r"code: node\.code", settings)] assert len(sends) == 1 before = settings[settings.rfind("\n", 0, sends[0] - 200):sends[0]] - assert "inviteByEmail ?" in before, "the code reaches the hub only when the box asks" + assert "mailIt ?" in before, "the code reaches the hub only when the box asks" + assert "const mailIt = inviteByEmail && Boolean(email);" in settings, ( + "and the box asks only when there is an address to mail") def test_signing_out_forgets_the_invitation(): |