Skip to content

Commit

Permalink
[#2800] Respect configured kanaal when registering contactmoment on zaak
Browse files Browse the repository at this point in the history
  • Loading branch information
swrichards committed Oct 8, 2024
1 parent 96c7bf1 commit fab0ecd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/open_inwoner/cms/cases/tests/test_contactform.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def setUp(self):
self.ok_config.register_bronorganisatie_rsin = "123456788"
self.ok_config.register_type = "Melding"
self.ok_config.register_employee_id = "FooVonBar"
self.ok_config.register_channel = "the-designated-channel"
self.ok_config.klanten_service = ServiceFactory(
api_root=KLANTEN_ROOT, api_type=APITypes.kc
)
Expand Down Expand Up @@ -498,7 +499,7 @@ def test_form_success_with_api(self, m, mock_contactmoment, mock_send_confirm):
payload,
{
"bronorganisatie": "123456788",
"kanaal": "contactformulier",
"kanaal": "the-designated-channel",
"medewerkerIdentificatie": {"identificatie": "FooVonBar"},
"onderwerp": "afdeling-x",
"tekst": "Sample text",
Expand Down Expand Up @@ -560,7 +561,7 @@ def test_form_success_missing_medewerker(
payload,
{
"bronorganisatie": "123456788",
"kanaal": "contactformulier",
"kanaal": "the-designated-channel",
"onderwerp": "afdeling-x",
"tekst": "Sample text",
"type": "Melding",
Expand Down Expand Up @@ -644,7 +645,7 @@ def test_form_success_with_api_eherkenning_user(
payload,
{
"bronorganisatie": "123456788",
"kanaal": "contactformulier",
"kanaal": "the-designated-channel",
"medewerkerIdentificatie": {"identificatie": "FooVonBar"},
"onderwerp": "afdeling-x",
"tekst": "Sample text",
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/cms/cases/views/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ def register_by_api(self, form, config: OpenKlantConfig):
"bronorganisatie": config.register_bronorganisatie_rsin,
"tekst": question,
"type": config.register_type,
"kanaal": "contactformulier",
"kanaal": config.register_channel,
}
if employee_id := config.register_employee_id:
data["medewerkerIdentificatie"] = {"identificatie": employee_id}
Expand Down

0 comments on commit fab0ecd

Please sign in to comment.