BTHLABS-81: OG Properties on Share Association page

Co-authored-by: Tomek Wójcik <labs@tomekwojcik.pl>
Co-committed-by: Tomek Wójcik <labs@tomekwojcik.pl>
This commit is contained in:
2026-01-14 19:52:29 +00:00
parent 98e5e1891a
commit d16f0cd957
4 changed files with 47 additions and 8 deletions

View File

@@ -28,13 +28,15 @@ def test_authenticated_ok(authenticated_client: Client,
assert result.context['association'].target.pk == association_out.target.pk
assert result.context['show_controls'] is True
assert 'share_url' in result.context
assert result.context['is_share'] is False
assert result.context['og_card_url'] is None
expected_share_url = reverse(
'ui.associations.view',
args=(association_out.pk,),
query=[('share', 'true')],
)
assert result.context['share_url'] == expected_share_url
assert result.context['share_url'].endswith(expected_share_url)
@pytest.mark.django_db
@@ -126,6 +128,16 @@ def test_authenticated_share_ok(authenticated_client: Client,
assert hasattr(result.context['association'], 'target') is True
assert result.context['association'].target.pk == other_account_association_out.target.pk
assert result.context['show_controls'] is False
assert 'share_url' in result.context
assert result.context['is_share'] is True
assert result.context['og_card_url'] is not None
expected_share_url = reverse(
'ui.associations.view',
args=(other_account_association_out.pk,),
query=[('share', 'true')],
)
assert result.context['share_url'].endswith(expected_share_url)
@pytest.mark.django_db