Skip to content

Commit

Permalink
add test for shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas committed Feb 23, 2024
1 parent 632e944 commit e8902c1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,14 @@ def test_extra_context_with_no_extra_context(req):

with pytest.raises(AttributeError):
assert rendered_item.foo == "bar"


def test_extra_context_shadowing(req):
item = NavItem(
title="Test",
url="/test/",
extra_context={"title": "Shadowed"},
)
rendered_item = RenderedNavItem(item, req)

assert rendered_item.title == "Test"

0 comments on commit e8902c1

Please sign in to comment.