File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
library/src/test/java/com/pengrad/telegrambot Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -839,12 +839,18 @@ public void setChatDescription() {
839839 @ Test
840840 public void pinChatMessage () {
841841 BaseResponse response = bot .execute (new PinChatMessage (groupId , 18 ).disableNotification (false ));
842- assertTrue (response .isOk ());
842+ if (!response .isOk ()) {
843+ assertEquals (400 , response .errorCode ());
844+ assertEquals ("Bad Request: CHAT_NOT_MODIFIED" , response .description ());
845+ }
843846 }
844847
845848 @ Test
846849 public void unpinChatMessage () {
847850 BaseResponse response = bot .execute (new UnpinChatMessage (groupId ));
848- assertTrue (response .isOk ());
851+ if (!response .isOk ()) {
852+ assertEquals (400 , response .errorCode ());
853+ assertEquals ("Bad Request: CHAT_NOT_MODIFIED" , response .description ());
854+ }
849855 }
850856}
You can’t perform that action at this time.
0 commit comments