Skip to content

Commit

Permalink
Inserido o botão de login
Browse files Browse the repository at this point in the history
close #156
  • Loading branch information
diegomaranhao committed Jun 22, 2020
1 parent acd031c commit 42c31c1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pypro/base/templates/base/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<a class="nav-link js-scroll-trigger" href="#contact">Contact</a>
</li>
</ul>
<a class="btn btn-light" href="{% url 'login' %}">Entrar</a>

</div>
</div>
</nav>
Expand Down
15 changes: 15 additions & 0 deletions pypro/base/tests/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from django.urls import reverse
from model_mommy import mommy

from pypro.base.django_assertions import assert_contains


@pytest.fixture
def resp(client, db):
Expand Down Expand Up @@ -30,3 +32,16 @@ def resp_post(client, usuario):
def test_login_redirect(resp_post):
assert resp_post.status_code == 302
assert resp_post.url == reverse('modulos:indice')


@pytest.fixture
def resp_home(client, db):
return client.get(reverse('base:home'))


def test_botao_entrar_disponivel(resp_home):
assert_contains(resp_home, 'Entrar')


def test_link_entrar_disponivel(resp_home):
assert_contains(resp_home, reverse('login'))

0 comments on commit 42c31c1

Please sign in to comment.