forked from GithubBackups/healthchecks
Hide the "Confirmation Needed" notice if email channel verification is turned off. Update changelog.
This commit is contained in:
parent
12f8ffcd80
commit
499720a156
@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Improvements
|
### Improvements
|
||||||
- Add the EMAIL_USE_VERIFICATION configuration setting (#232)
|
- Add the EMAIL_USE_VERIFICATION configuration setting (#232)
|
||||||
- Show "Badges" and "Settings" in top navigation (#234)
|
- Show "Badges" and "Settings" in top navigation (#234)
|
||||||
|
- Upgrade to Django 2.2
|
||||||
|
|
||||||
|
|
||||||
## 1.6.0 - 2019-04-01
|
## 1.6.0 - 2019-04-01
|
||||||
|
@ -12,6 +12,7 @@ class AddEmailTestCase(BaseTestCase):
|
|||||||
self.client.login(username="alice@example.org", password="password")
|
self.client.login(username="alice@example.org", password="password")
|
||||||
r = self.client.get(self.url)
|
r = self.client.get(self.url)
|
||||||
self.assertContains(r, "Get an email message")
|
self.assertContains(r, "Get an email message")
|
||||||
|
self.assertContains(r, "Confirmation needed")
|
||||||
|
|
||||||
def test_it_creates_channel(self):
|
def test_it_creates_channel(self):
|
||||||
form = {"value": "alice@example.org"}
|
form = {"value": "alice@example.org"}
|
||||||
@ -58,6 +59,12 @@ class AddEmailTestCase(BaseTestCase):
|
|||||||
c = Channel.objects.get()
|
c = Channel.objects.get()
|
||||||
self.assertEqual(c.value, "alice@example.org")
|
self.assertEqual(c.value, "alice@example.org")
|
||||||
|
|
||||||
|
@override_settings(EMAIL_USE_VERIFICATION=False)
|
||||||
|
def test_it_hides_confirmation_needed_notice(self):
|
||||||
|
self.client.login(username="alice@example.org", password="password")
|
||||||
|
r = self.client.get(self.url)
|
||||||
|
self.assertNotContains(r, "Confirmation needed")
|
||||||
|
|
||||||
@override_settings(EMAIL_USE_VERIFICATION=False)
|
@override_settings(EMAIL_USE_VERIFICATION=False)
|
||||||
def test_it_auto_verifies_email(self):
|
def test_it_auto_verifies_email(self):
|
||||||
form = {"value": "alice@example.org"}
|
form = {"value": "alice@example.org"}
|
||||||
|
@ -698,6 +698,7 @@ def add_email(request):
|
|||||||
ctx = {
|
ctx = {
|
||||||
"page": "channels",
|
"page": "channels",
|
||||||
"project": request.project,
|
"project": request.project,
|
||||||
|
"use_verification": settings.EMAIL_USE_VERIFICATION,
|
||||||
"form": form
|
"form": form
|
||||||
}
|
}
|
||||||
return render(request, "integrations/add_email.html", ctx)
|
return render(request, "integrations/add_email.html", ctx)
|
||||||
|
@ -16,11 +16,13 @@
|
|||||||
Add multiple email addresses, to notify multiple team members.
|
Add multiple email addresses, to notify multiple team members.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
{% if use_verification %}
|
||||||
<p>
|
<p>
|
||||||
<strong>Confirmation needed.</strong>
|
<strong>Confirmation needed.</strong>
|
||||||
After entering an email address, {% site_name %} will send out a confirmation link.
|
After entering an email address, {% site_name %} will send out a confirmation link.
|
||||||
Only confirmed addresses will receive notifications.
|
Only confirmed addresses will receive notifications.
|
||||||
</p>
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<h2>Integration Settings</h2>
|
<h2>Integration Settings</h2>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user