-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2106] Renamed config field to
send_email_confirmation
- Loading branch information
Bart van der Schoor
committed
Apr 18, 2024
1 parent
7998855
commit 0143e9d
Showing
8 changed files
with
43 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -609,14 +609,14 @@ def test_form_success_with_both_email_and_api( | |
|
||
mock_send_confirm.assert_called_once_with("[email protected]", ANY) | ||
|
||
def test_api_sends_email_confirmation_is_configurable__api_does_not_send( | ||
def test_send_email_confirmation_is_configurable__send_enabled( | ||
self, m, mock_contactmoment, mock_send_confirm | ||
): | ||
self._setUpMocks(m) | ||
self._setUpExtraMocks(m) | ||
|
||
config = OpenKlantConfig.get_solo() | ||
config.api_sends_email_confirmation = False | ||
config.send_email_confirmation = True | ||
config.save() | ||
|
||
response = self.app.get(self.case_detail_url, user=self.user) | ||
|
@@ -628,14 +628,14 @@ def test_api_sends_email_confirmation_is_configurable__api_does_not_send( | |
response = form.submit() | ||
mock_send_confirm.assert_called_once() | ||
|
||
def test_api_sends_email_confirmation_is_configurable__api_sends( | ||
def test_send_email_confirmation_is_configurable__send_disabled( | ||
self, m, mock_contactmoment, mock_send_confirm | ||
): | ||
self._setUpMocks(m) | ||
self._setUpExtraMocks(m) | ||
|
||
config = OpenKlantConfig.get_solo() | ||
config.api_sends_email_confirmation = True | ||
config.send_email_confirmation = False | ||
config.save() | ||
|
||
response = self.app.get(self.case_detail_url, user=self.user) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
src/open_inwoner/openklant/migrations/0011_openklantconfig_api_sends_email_confirmation.py
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
src/open_inwoner/openklant/migrations/0012_openklantconfig_send_email_confirmation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 4.2.11 on 2024-04-18 07:57 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
( | ||
"openklant", | ||
"0011_alter_openklantconfig_use_rsin_for_innnnpid_query_parameter", | ||
), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="openklantconfig", | ||
name="send_email_confirmation", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="If enabled the 'contactform_confirmation' email template will be sent. If disabled the external API will send a confirmation email.", | ||
verbose_name="Stuur contactformulier e-mailbevestiging", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters