|
@@
-85,7
+85,7
b' class TestLoginController(TestController'
|
|
85
|
'password': 'test12',
|
|
85
|
'password': 'test12',
|
|
86
|
'password_confirmation': 'test12',
|
|
86
|
'password_confirmation': 'test12',
|
|
87
|
'email': 'goodmail@domain.com',
|
|
87
|
'email': 'goodmail@domain.com',
|
|
88
|
'name': 'test',
|
|
88
|
'firstname': 'test',
|
|
89
|
'lastname': 'test'})
|
|
89
|
'lastname': 'test'})
|
|
90
|
|
|
90
|
|
|
91
|
msg = validators.ValidUsername()._messages['username_exists']
|
|
91
|
msg = validators.ValidUsername()._messages['username_exists']
|
|
@@
-98,7
+98,7
b' class TestLoginController(TestController'
|
|
98
|
'password': 'test12',
|
|
98
|
'password': 'test12',
|
|
99
|
'password_confirmation': 'test12',
|
|
99
|
'password_confirmation': 'test12',
|
|
100
|
'email': 'test_admin@mail.com',
|
|
100
|
'email': 'test_admin@mail.com',
|
|
101
|
'name': 'test',
|
|
101
|
'firstname': 'test',
|
|
102
|
'lastname': 'test'})
|
|
102
|
'lastname': 'test'})
|
|
103
|
|
|
103
|
|
|
104
|
msg = validators.UniqSystemEmail()()._messages['email_taken']
|
|
104
|
msg = validators.UniqSystemEmail()()._messages['email_taken']
|
|
@@
-110,7
+110,7
b' class TestLoginController(TestController'
|
|
110
|
'password': 'test12',
|
|
110
|
'password': 'test12',
|
|
111
|
'password_confirmation': 'test12',
|
|
111
|
'password_confirmation': 'test12',
|
|
112
|
'email': 'TesT_Admin@mail.COM',
|
|
112
|
'email': 'TesT_Admin@mail.COM',
|
|
113
|
'name': 'test',
|
|
113
|
'firstname': 'test',
|
|
114
|
'lastname': 'test'})
|
|
114
|
'lastname': 'test'})
|
|
115
|
msg = validators.UniqSystemEmail()()._messages['email_taken']
|
|
115
|
msg = validators.UniqSystemEmail()()._messages['email_taken']
|
|
116
|
response.mustcontain(msg)
|
|
116
|
response.mustcontain(msg)
|
|
@@
-121,7
+121,7
b' class TestLoginController(TestController'
|
|
121
|
'password': 'test',
|
|
121
|
'password': 'test',
|
|
122
|
'password_confirmation': 'test',
|
|
122
|
'password_confirmation': 'test',
|
|
123
|
'email': 'goodmailm',
|
|
123
|
'email': 'goodmailm',
|
|
124
|
'name': 'test',
|
|
124
|
'firstname': 'test',
|
|
125
|
'lastname': 'test'})
|
|
125
|
'lastname': 'test'})
|
|
126
|
self.assertEqual(response.status, '200 OK')
|
|
126
|
self.assertEqual(response.status, '200 OK')
|
|
127
|
response.mustcontain('An email address must contain a single @')
|
|
127
|
response.mustcontain('An email address must contain a single @')
|
|
@@
-133,7
+133,7
b' class TestLoginController(TestController'
|
|
133
|
'password': 'test12',
|
|
133
|
'password': 'test12',
|
|
134
|
'password_confirmation': 'test12',
|
|
134
|
'password_confirmation': 'test12',
|
|
135
|
'email': 'goodmailm',
|
|
135
|
'email': 'goodmailm',
|
|
136
|
'name': 'test',
|
|
136
|
'firstname': 'test',
|
|
137
|
'lastname': 'test'})
|
|
137
|
'lastname': 'test'})
|
|
138
|
|
|
138
|
|
|
139
|
response.mustcontain('An email address must contain a single @')
|
|
139
|
response.mustcontain('An email address must contain a single @')
|
|
@@
-149,7
+149,7
b' class TestLoginController(TestController'
|
|
149
|
'password': 'test12',
|
|
149
|
'password': 'test12',
|
|
150
|
'password_confirmation': 'test12',
|
|
150
|
'password_confirmation': 'test12',
|
|
151
|
'email': 'goodmailm',
|
|
151
|
'email': 'goodmailm',
|
|
152
|
'name': 'test',
|
|
152
|
'firstname': 'test',
|
|
153
|
'lastname': 'test'})
|
|
153
|
'lastname': 'test'})
|
|
154
|
|
|
154
|
|
|
155
|
response.mustcontain('An email address must contain a single @')
|
|
155
|
response.mustcontain('An email address must contain a single @')
|
|
@@
-163,7
+163,7
b' class TestLoginController(TestController'
|
|
163
|
'password': 'ąćźżąśśśś',
|
|
163
|
'password': 'ąćźżąśśśś',
|
|
164
|
'password_confirmation': 'ąćźżąśśśś',
|
|
164
|
'password_confirmation': 'ąćźżąśśśś',
|
|
165
|
'email': 'goodmailm@test.plx',
|
|
165
|
'email': 'goodmailm@test.plx',
|
|
166
|
'name': 'test',
|
|
166
|
'firstname': 'test',
|
|
167
|
'lastname': 'test'})
|
|
167
|
'lastname': 'test'})
|
|
168
|
|
|
168
|
|
|
169
|
msg = validators.ValidPassword()._messages['invalid_password']
|
|
169
|
msg = validators.ValidPassword()._messages['invalid_password']
|
|
@@
-175,7
+175,7
b' class TestLoginController(TestController'
|
|
175
|
'password': '123qwe',
|
|
175
|
'password': '123qwe',
|
|
176
|
'password_confirmation': 'qwe123',
|
|
176
|
'password_confirmation': 'qwe123',
|
|
177
|
'email': 'goodmailm@test.plxa',
|
|
177
|
'email': 'goodmailm@test.plxa',
|
|
178
|
'name': 'test',
|
|
178
|
'firstname': 'test',
|
|
179
|
'lastname': 'test'})
|
|
179
|
'lastname': 'test'})
|
|
180
|
msg = validators.ValidPasswordsMatch()._messages['password_mismatch']
|
|
180
|
msg = validators.ValidPasswordsMatch()._messages['password_mismatch']
|
|
181
|
response.mustcontain(msg)
|
|
181
|
response.mustcontain(msg)
|
|
@@
-192,7
+192,7
b' class TestLoginController(TestController'
|
|
192
|
'password': password,
|
|
192
|
'password': password,
|
|
193
|
'password_confirmation': password,
|
|
193
|
'password_confirmation': password,
|
|
194
|
'email': email,
|
|
194
|
'email': email,
|
|
195
|
'name': name,
|
|
195
|
'firstname': name,
|
|
196
|
'lastname': lastname,
|
|
196
|
'lastname': lastname,
|
|
197
|
'admin': True}) # This should be overriden
|
|
197
|
'admin': True}) # This should be overriden
|
|
198
|
self.assertEqual(response.status, '302 Found')
|
|
198
|
self.assertEqual(response.status, '302 Found')
|