Skip to content

Commit

Permalink
Merge pull request #872 from maykinmedia/feature/1892-fetching-zaken-…
Browse files Browse the repository at this point in the history
…no-rsin-regression-test

✅ [#1892] Regression test for Mijn aanvragen list if user has no RSIN
  • Loading branch information
stevenbal authored Dec 4, 2023
2 parents bbc1a2a + 7ddfabc commit 97ca46d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/open_inwoner/openzaak/tests/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,36 @@ def test_list_cases_for_eherkenning_user(self, m):
},
)

def test_list_cases_for_eherkenning_user_missing_rsin(self, m):
self._setUpMocks(m)

self.eherkenning_user.rsin = ""
self.eherkenning_user.save()

self.config.fetch_eherkenning_zaken_with_rsin = True
self.config.save()

m.reset_mock()

response = self.app.get(
self.inner_url,
user=self.eherkenning_user,
headers={"HX-Request": "true"},
)

self.assertListEqual(response.context["cases"], [])
# don't show internal cases
self.assertNotContains(response, self.zaak_intern["omschrijving"])
self.assertNotContains(response, self.zaak_intern["identificatie"])

# check zaken request query parameters
list_zaken_req = [
req
for req in m.request_history
if req.hostname == "zaken.nl" and req.path == "/api/v1/zaken"
]
self.assertEqual(len(list_zaken_req), 0)

def test_format_zaak_identificatie(self, m):
config = OpenZaakConfig.get_solo()
self._setUpMocks(m)
Expand Down

0 comments on commit 97ca46d

Please sign in to comment.