Skip to content

Commit

Permalink
mockito 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rossnomann committed Mar 21, 2024
1 parent de0fc3c commit 1fada4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tokio-util = { version = "0.7", features = ["codec"] }
[dev-dependencies]
dotenvy = "0.15"
env_logger = "0.11"
mockito = "1.2"
mockito = "1.4.0"
pretty_assertions = "1.4"
regex = "1.10"
tempfile = "3.10"
Expand Down
4 changes: 2 additions & 2 deletions tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use tgbot::{api::Client, types::Close};

#[tokio::test]
async fn execute() {
let mut server = Server::new();
let mut server = Server::new_async().await;
let client = Client::new("-token").unwrap().with_host(server.url());

server
Expand Down Expand Up @@ -43,7 +43,7 @@ async fn execute() {

#[tokio::test]
async fn download_file() {
let mut server = Server::new();
let mut server = Server::new_async().await;
server
.mock("GET", "/file/bot-token/file-ok")
.with_body(b"file-data")
Expand Down
2 changes: 1 addition & 1 deletion tests/longpoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl UpdateHandler for Handler {
async fn longpoll() {
dotenv().ok();
env_logger::init();
let mut server = Server::new();
let mut server = Server::new_async().await;
server
.mock("POST", "/bot-token/getUpdates")
.match_body(Matcher::PartialJson(json!({
Expand Down

0 comments on commit 1fada4a

Please sign in to comment.