Skip to content

Commit

Permalink
test: Query tests now use string params
Browse files Browse the repository at this point in the history
This reflects previous changes to the approach for generating lists of options.
  • Loading branch information
DadiBit committed Jun 4, 2023
1 parent cfe6bfc commit a17abf1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ class QueryTest {
class Programmer(
val name: String,
val surname: String,
@Serializable(with = ListAsString::class)
@SerialName("languages")
val programmingLanguages: List<String>,
val programmingLanguages: String,
) : Query

@Test
Expand All @@ -36,7 +35,7 @@ class QueryTest {
"JavaScript",
"HTML",
"CSS",
))
).joinToString(","))
// Do not worry, %2C is the URL encoded comma: it gets decoded properly before splitting
//assertEquals("?name=John&languages=Kotlin,Java,JavaScript,HTML,CSS&surname=Doe",
assertEquals("?name=John&surname=Doe&languages=Kotlin%2CJava%2CJavaScript%2CHTML%2CCSS",
Expand Down

0 comments on commit a17abf1

Please sign in to comment.