Fix test, cleanup 🛁

This commit is contained in:
Christian Cueni 2019-10-08 11:24:54 +02:00
parent 61161407b6
commit 0694471270
5 changed files with 6 additions and 5 deletions

View File

@ -7,7 +7,7 @@ describe('Change Password Page', () => {
const validationOldWrongMsg = 'Die Eingabe ist falsch';
beforeEach(function () {
// cy.clearCookies();
cy.clearCookies();
cy.visit('/me/profile');
cy.login('rahel.cueni', 'test');
});

View File

@ -124,7 +124,6 @@ router.beforeEach((to, from, next) => {
} else {
next();
}
// todo handle public pages for user
});
/* eslint-disable no-new */

View File

@ -14,3 +14,4 @@ MIGRATION_MODULES = DisableMigrations()
# Email Settings
SENDGRID_API_KEY = ""
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
LOGIN_REDIRECT_URL = '/accounts/login/'

View File

@ -1,5 +1,3 @@
//@import "materialize/materialize";
$white: #fff;
$grey-1: #F7F7F7;

View File

@ -1,7 +1,9 @@
import json
from django.test import TestCase, Client
from django.test.utils import override_settings
from core import settings
from core.factories import UserFactory
@ -17,7 +19,8 @@ class ApiAccessTestCase(TestCase):
def test_graphqlEndpoint_shouldNotBeAccessibleWithoutLogin(self):
c = Client()
response = c.post('/api/graphql/', data=self.query, content_type='application/json')
self.assertRedirects(response, '/login?next=/api/graphql/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, '/login?next=/api/graphql/')
def test_graphqlEndpoint_shouldBeAccessibleWithLogin(self):
user = UserFactory(username='admin')