Skip to content

Commit 131d4ac

Browse files
committed
Update OkHttp 3.12.3, Permit multipart file names to contain non-ASCII characters #169
1 parent 96d4334 commit 131d4ac

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ compileTestJava {
1111

1212
dependencies {
1313
compile 'com.google.code.gson:gson:2.8.5'
14-
compile 'com.squareup.okhttp3:okhttp:3.12.1'
15-
compile 'com.squareup.okhttp3:logging-interceptor:3.12.1'
14+
compile 'com.squareup.okhttp3:okhttp:3.12.3'
15+
compile 'com.squareup.okhttp3:logging-interceptor:3.12.3'
1616

1717
testCompile 'junit:junit:4.12'
1818
testCompile 'nl.jqno.equalsverifier:equalsverifier:3.1.7'

library/src/test/java/com/pengrad/telegrambot/TelegramBotTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,4 +1396,15 @@ public void loginButton() {
13961396
assertEquals(text, button.text());
13971397
assertEquals(url, button.url());
13981398
}
1399+
1400+
@Test
1401+
public void multipartNonAscii() {
1402+
String caption = "хорошо";
1403+
Message message = bot.execute(
1404+
new SendPhoto(chatId, imageFile).fileName("файл.txt").caption(caption)
1405+
).message();
1406+
assertEquals(caption, message.caption());
1407+
MessageTest.checkMessage(message);
1408+
PhotoSizeTest.checkPhotos(message.photo());
1409+
}
13991410
}

0 commit comments

Comments
 (0)