Updated dependencies
This commit is contained in:
parent
2313d36584
commit
c99debd740
12 changed files with 43 additions and 30 deletions
|
@ -32,7 +32,7 @@ package net.thauvin.erik.mobibot.modules
|
|||
|
||||
import net.thauvin.erik.jokeapi.exceptions.HttpErrorException
|
||||
import net.thauvin.erik.jokeapi.exceptions.JokeException
|
||||
import net.thauvin.erik.jokeapi.getJoke
|
||||
import net.thauvin.erik.jokeapi.joke
|
||||
import net.thauvin.erik.jokeapi.models.Type
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.colorize
|
||||
|
@ -83,7 +83,7 @@ class Joke : AbstractModule() {
|
|||
@Throws(ModuleException::class)
|
||||
fun randomJoke(): List<Message> {
|
||||
return try {
|
||||
val joke = getJoke(safe = true, type = Type.SINGLE, splitNewLine = true)
|
||||
val joke = joke(safe = true, type = Type.SINGLE, splitNewLine = true)
|
||||
joke.joke.map { PublicMessage(it, Colors.CYAN) }
|
||||
} catch (e: JokeException) {
|
||||
throw ModuleException("randomJoke(): ${e.additionalInfo}", e.message, e)
|
||||
|
|
|
@ -72,7 +72,7 @@ class CryptoPricesTest {
|
|||
|
||||
@Test(groups = ["modules"])
|
||||
fun testGetCurrencyName() {
|
||||
assertThat(getCurrencyName("USD"), "USD").isEqualTo("US Dollar")
|
||||
assertThat(getCurrencyName("USD"), "USD").isEqualTo("United States Dollar")
|
||||
assertThat(getCurrencyName("EUR"), "EUR").isEqualTo("Euro")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue