summaryrefslogtreecommitdiffstats
path: root/core/js/tests/specs/jquery.avatarSpec.js
Commit message (Collapse)AuthorAgeFilesLines
* Fix testsJulius Härtl2018-01-081-2/+0
| | | | | | | | The avatar plugin should not change the display element, since the avatar is always shown by default and the display value is up to the developers Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix testsRoeland Jago Douma2017-12-191-77/+60
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Reduce JSHint errors/warningsMorris Jobke2017-11-061-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use "?" instead of user ID as seed for the image placeholderDaniel Calviño Sánchez2017-09-201-1/+1
| | | | | | | | | | The seed of the image placeholder is needed to generate the background color of the image, but as the background color is later overriden any seed could be used. When no text is explicitly given the seed is used as text too, so there is no need to pass the user ID and simply using "?" as seed is enough. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Unify appearance of avatars for undefined and unknown usersDaniel Calviño Sánchez2017-09-201-0/+4
| | | | | | | | | | | | | | When calling the jQuery avatar plugin with a user that did not exist (that is, users for which "/avatar/{user}/{size}" return a JSON response with an empty "displayname" value) "?" on a grey background was shown. However, if the jQuery avatar plugin was called with an undefined JavaScript value then "?" was shown on a bluish background. This commit unifies both cases to use the grey background. The unit tests were also modified to ensure that the grey background is used in both cases. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix sinon.stub deprecation warningsChristoph Wurst2017-04-241-1/+1
| | | | | | | | | | Calls to `sinon.stub(obj, 'meth', fn)` are deprecated and therefore replaced by `sinon.stub(obj, 'meth).callsFake(fn)` as instructed by the deprecation warning. This makes the js unit testing output readable again. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix unit testsMorris Jobke2016-11-231-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Added js tests for jquery.avatarRoeland Jago Douma2015-09-141-0/+240
* Ceil avatar request size