Skip to content
Snippets Groups Projects
Verified Commit b9298508 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fix tests

parent b29179f8
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -24,6 +24,7 @@ import de.kuschku.libquassel.protocol.Message_Type ...@@ -24,6 +24,7 @@ import de.kuschku.libquassel.protocol.Message_Type
import de.kuschku.quasseldroid.persistence.QuasselDatabase import de.kuschku.quasseldroid.persistence.QuasselDatabase
import de.kuschku.quasseldroid.settings.MessageSettings import de.kuschku.quasseldroid.settings.MessageSettings
import de.kuschku.quasseldroid.util.avatars.AvatarHelper import de.kuschku.quasseldroid.util.avatars.AvatarHelper
import de.kuschku.quasseldroid.viewmodel.data.Avatar
import org.junit.Test import org.junit.Test
import org.threeten.bp.Instant import org.threeten.bp.Instant
...@@ -51,7 +52,9 @@ class AvatarHelperTest { ...@@ -51,7 +52,9 @@ class AvatarHelperTest {
showIRCCloudAvatars = true showIRCCloudAvatars = true
), ),
message message
).contains("https://www.gravatar.com/avatar/81128f11cae692bc486e3f88b854ddf1?d=404") ).contains(
Avatar.GravatarAvatar("https://www.gravatar.com/avatar/81128f11cae692bc486e3f88b854ddf1?d=404")
)
) )
assert( assert(
...@@ -88,7 +91,9 @@ class AvatarHelperTest { ...@@ -88,7 +91,9 @@ class AvatarHelperTest {
showIRCCloudAvatars = true showIRCCloudAvatars = true
), ),
message message
).contains("https://static.irccloud-cdn.com/avatar-redirect/2") ).contains(
Avatar.IRCCloudAvatar("https://static.irccloud-cdn.com/avatar-redirect/2")
)
) )
assert( assert(
...@@ -125,7 +130,9 @@ class AvatarHelperTest { ...@@ -125,7 +130,9 @@ class AvatarHelperTest {
showIRCCloudAvatars = true showIRCCloudAvatars = true
), ),
message message
).contains("https://quasseldroid.info/favicon.png") ).contains(
Avatar.NativeAvatar("https://quasseldroid.info/favicon.png")
)
) )
assert( assert(
...@@ -135,7 +142,7 @@ class AvatarHelperTest { ...@@ -135,7 +142,7 @@ class AvatarHelperTest {
showIRCCloudAvatars = false showIRCCloudAvatars = false
), ),
message message
) == listOf("https://quasseldroid.info/favicon.png") ) == listOf(Avatar.NativeAvatar("https://quasseldroid.info/favicon.png"))
) )
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment