summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/js/jquery.avatar.js1
-rw-r--r--core/js/tests/specs/jquery.avatarSpec.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js
index 29d019baea7..5813a80646f 100644
--- a/core/js/jquery.avatar.js
+++ b/core/js/jquery.avatar.js
@@ -73,6 +73,7 @@
user = this.data('user');
} else {
this.imageplaceholder('?');
+ this.css('background-color', '#b9b9b9');
return;
}
}
diff --git a/core/js/tests/specs/jquery.avatarSpec.js b/core/js/tests/specs/jquery.avatarSpec.js
index dab78500d0b..87767c8bc8f 100644
--- a/core/js/tests/specs/jquery.avatarSpec.js
+++ b/core/js/tests/specs/jquery.avatarSpec.js
@@ -62,10 +62,12 @@ describe('jquery.avatar tests', function() {
it('undefined user', function() {
spyOn($div, 'imageplaceholder');
+ spyOn($div, 'css');
$div.avatar();
expect($div.imageplaceholder).toHaveBeenCalledWith('?');
+ expect($div.css).toHaveBeenCalledWith('background-color', '#b9b9b9');
});
describe('no avatar', function() {
@@ -86,6 +88,7 @@ describe('jquery.avatar tests', function() {
it('show placeholder for non existing user', function() {
spyOn($div, 'imageplaceholder');
+ spyOn($div, 'css');
$div.avatar('foo');
fakeServer.requests[0].respond(
@@ -97,6 +100,7 @@ describe('jquery.avatar tests', function() {
);
expect($div.imageplaceholder).toHaveBeenCalledWith('foo', '?');
+ expect($div.css).toHaveBeenCalledWith('background-color', '#b9b9b9');
});
it('show no placeholder', function() {