Skip to content

Commit fa89677

Browse files
committed
Add a test for login get, and remove unused breadcrumbs block from template
1 parent 06f861a commit fa89677

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

airlock/templates/login.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
{% block metatitle %}Login | OpenSAFELY Airlock{% endblock metatitle %}
44

5-
{% block breadcrumbs %}
6-
{% url "home" as home_url %}
7-
8-
{% #breadcrumbs %}
9-
{% breadcrumb title="Home" url=home_url %}
10-
{% breadcrumb title="Login" active=True %}
11-
{% /breadcrumbs %}
12-
{% endblock breadcrumbs %}
13-
145
{% block content %}
156
<section class="flex flex-col max-w-2xl gap-y-4">
167
<h1 class="text-3xl break-words font-bold text-slate-900 mt-2 md:mt-0 md:col-span-3 md:text-4xl">

tests/integration/test_auth_views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
pytestmark = pytest.mark.django_db
77

88

9+
def test_login_get(client):
10+
response = client.get("/login/")
11+
assert response.status_code == 200
12+
assert "token_login_form" in response.context
13+
14+
915
@mock.patch("airlock.login_api.requests.post", autospec=True)
1016
def test_login(requests_post, client, settings):
1117
settings.AIRLOCK_API_TOKEN = "test_api_token"

0 commit comments

Comments
 (0)