diff --git a/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala b/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala index 0af96b9..27d8c7d 100644 --- a/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala +++ b/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala @@ -1,5 +1,6 @@ package gitbucket.core.view +import java.text.SimpleDateFormat import java.util.Date import gitbucket.core.model.Account @@ -34,18 +35,22 @@ it("should show uploaded image even if gravatar integration is enabled") { implicit val context = Context(createSystemSettings(true), None, request) - val provider = new AvatarImageProviderImpl(Some(createAccount(Some("icon.png")))) + val account = createAccount((Some("icon.png"))) + val date = new SimpleDateFormat("yyyyMMddHHmmss").format(account.updatedDate) + val provider = new AvatarImageProviderImpl(Some(account)) assert(provider.toHtml("user", 32).toString == - "") + s"""""") } it("should show local image for no image account if gravatar integration is disabled") { implicit val context = Context(createSystemSettings(false), None, request) - val provider = new AvatarImageProviderImpl(Some(createAccount(None))) + val account = createAccount(None) + val date = new SimpleDateFormat("yyyyMMddHHmmss").format(account.updatedDate) + val provider = new AvatarImageProviderImpl(Some(account)) assert(provider.toHtml("user", 32).toString == - "") + s"""""") } it("should show Gravatar image for specified mail address if gravatar integration is enabled") {