Skip to content

Commit 9794e6f

Browse files
committed
.
1 parent 673ab04 commit 9794e6f

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package requests
2+
3+
import utest._
4+
import ujson._
5+
6+
object Scala2RequestTests extends TestSuite{
7+
val tests = Tests{
8+
test("send"){
9+
requests.send("get")("https://httpbin.org/get?hello=world&foo=baz")
10+
11+
// This doesn't compile right in Scala3 for some reason
12+
val res1 = requests.send("put")(
13+
"https://httpbin.org/put",
14+
data = Map("hello" -> "world", "foo" -> "baz"),
15+
chunkedUpload = true
16+
).text
17+
18+
assert(read(res1).obj("form") == Obj("foo" -> "baz", "hello" -> "world"))
19+
}
20+
}
21+
}

requests/test/src/requests/RequestTests.scala

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,6 @@ object RequestTests extends TestSuite{
7777
assert(read(res1).obj("form") == Obj("foo" -> "baz", "hello" -> "world"))
7878
}
7979
}
80-
test("send"){
81-
requests.send("get")("https://httpbin.org/get?hello=world&foo=baz")
82-
83-
val res1 = requests.send("put")(
84-
"https://httpbin.org/put",
85-
data = Map("hello" -> "world", "foo" -> "baz"),
86-
chunkedUpload = true
87-
).text
88-
89-
assert(read(res1).obj("form") == Obj("foo" -> "baz", "hello" -> "world"))
90-
}
9180
}
9281
test("multipart"){
9382
for(chunkedUpload <- Seq(true, false)) {

0 commit comments

Comments
 (0)