summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Cazenave <ecazenave@entrouvert.com>2019-05-15 16:22:26 (GMT)
committerEmmanuel Cazenave <ecazenave@entrouvert.com>2019-05-16 15:30:42 (GMT)
commit2eaeeb367028e9c7ce92fec76ce756a9f6212df8 (patch)
tree49260b07a48150d01288bce529ea9c66dd7c1c17
parent64f2492280531f2cf41d9a4b43debdf3cc5855ac (diff)
downloadcombo-2eaeeb367028e9c7ce92fec76ce756a9f6212df8.zip
combo-2eaeeb367028e9c7ce92fec76ce756a9f6212df8.tar.gz
combo-2eaeeb367028e9c7ce92fec76ce756a9f6212df8.tar.bz2
lingo: got back to regie list liew after edition cancel (#33050)
-rw-r--r--combo/apps/lingo/templates/lingo/regie_form.html2
-rw-r--r--tests/test_lingo_manager.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/combo/apps/lingo/templates/lingo/regie_form.html b/combo/apps/lingo/templates/lingo/regie_form.html
index 1788859..5d4442b 100644
--- a/combo/apps/lingo/templates/lingo/regie_form.html
+++ b/combo/apps/lingo/templates/lingo/regie_form.html
@@ -16,7 +16,7 @@
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
- <a class="cancel" href="{% url 'lingo-manager-homepage' %}">{% trans 'Cancel' %}</a>
+ <a class="cancel" href="{% url 'lingo-manager-regie-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}
diff --git a/tests/test_lingo_manager.py b/tests/test_lingo_manager.py
index a66a178..44c1f17 100644
--- a/tests/test_lingo_manager.py
+++ b/tests/test_lingo_manager.py
@@ -42,6 +42,7 @@ def test_add_regie(app, admin_user, payment_backend):
app = login(app)
resp = app.get('/manage/lingo/regies/', status=200)
resp = resp.click('New')
+ assert '/manage/lingo/regies/' in resp.text
resp.forms[0]['label'] = 'Test'
resp.forms[0]['slug'] = 'test'
resp.forms[0]['description'] = 'description'
@@ -59,6 +60,7 @@ def test_edit_regie(app, admin_user, payment_backend):
app = login(app)
resp = app.get('/manage/lingo/regies/', status=200)
resp = resp.click('Test')
+ assert '/manage/lingo/regies/' in resp.text
resp.forms[0]['description'] = 'other description'
resp = resp.forms[0].submit()
assert resp.location.endswith('/manage/lingo/regies/')