You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Telegram provides a dedicated [environment for**bot testing**](https://core.telegram.org/bots/webapps#testing-mini-apps). It allows safe, isolated testing of bot functionality without affecting production data or users.
462
+
463
+
To send requests to the test environment, insert`/test`**between the bot token and method name**in your API call. This acts as a shorthand "hack" to avoid changing your code structure.
464
+
465
+
```ruby
466
+
# Normal token:
467
+
'123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'
468
+
469
+
# Modified for test environment:
470
+
'123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/test'
471
+
```
472
+
459
473
### Testing
460
474
461
475
There is a `Telegram::Bot::ClientStub`class to stub client for tests.
0 commit comments