diff options
| author | 2020-03-08 00:14:29 +0100 | |
|---|---|---|
| committer | 2020-03-08 00:14:29 +0100 | |
| commit | 51edbc1578fe49b281b39d91451d2b9df0092028 (patch) | |
| tree | d82c6181797cbebe38e7a6dc5934237dc6597b15 /tests | |
| parent | 128b3367880fd18e4179123b4e533d14902b484c (diff) | |
Improve login and registration pages (#2794)
* Keep the user on login page on failure
* Show an error if username already exists
* Check the password format in the backend
* Return a better message if username is invalid
* Add a title to the login page
* wip: Improve look of login and register pages
* Set a capital M in username help message
On the registration page, username tip started with a minuscule, while
the password tip started with a capital.
* Change message if username is taken
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/app/Utils/passwordUtilTest.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/app/Utils/passwordUtilTest.php b/tests/app/Utils/passwordUtilTest.php new file mode 100644 index 000000000..90c05004f --- /dev/null +++ b/tests/app/Utils/passwordUtilTest.php @@ -0,0 +1,27 @@ +<?php + +class FreshRSS_password_UtilTest extends PHPUnit\Framework\TestCase { + public function testCheck() { + $password = '1234567'; + + $ok = FreshRSS_password_Util::check($password); + + $this->assertTrue($ok); + } + + public function testCheckReturnsFalseIfEmpty() { + $password = ''; + + $ok = FreshRSS_password_Util::check($password); + + $this->assertFalse($ok); + } + + public function testCheckReturnsFalseIfLessThan7Characters() { + $password = '123456'; + + $ok = FreshRSS_password_Util::check($password); + + $this->assertFalse($ok); + } +} |
