Skip to content

Commit

Permalink
Add test for migration of anchor-only link.
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 27, 2024
1 parent 1790799 commit 3d538e3
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions tests/test_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ def prepare(self):
Link.objects.create(
template="default",
name="My Link",
external_link="http://www.django-cms.com",
external_link="https://www.django-cms.com",
),
Link.objects.create(
template="default",
name="My Link",
external_link="https://www.django-cms.com/",
anchor="some_id",
),
Link.objects.create(
template="default",
Expand All @@ -102,8 +108,20 @@ def prepare(self):
name="My Link",
phone="+01 234 567 89",
),
Link.objects.create(
template="default",
name="My Link",
anchor="anchor",
),
]
self.urls = [
"/en/my-page/#some_id",
"https://www.django-cms.com",
"https://www.django-cms.com/#some_id",
"mailto:[email protected]",
"tel:+0123456789",
"#anchor",
]
self.urls = ["/en/my-page/#some_id", "http://www.django-cms.com", "mailto:[email protected]", "tel:+0123456789"]

def test_tags_migrated(self):
Link = self.new_state.apps.get_model('djangocms_link', 'Link')
Expand Down

0 comments on commit 3d538e3

Please sign in to comment.