mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-19 06:26:35 +00:00
Use tokio::test.
This commit is contained in:
parent
9ba07c4834
commit
74b7b1c536
1 changed files with 3 additions and 3 deletions
|
@ -86,7 +86,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[tokio::test]
|
||||||
async fn send_email_sends_the_expected_request() {
|
async fn send_email_sends_the_expected_request() {
|
||||||
// Arrange
|
// Arrange
|
||||||
let mock_server = MockServer::start().await;
|
let mock_server = MockServer::start().await;
|
||||||
|
@ -115,7 +115,7 @@ mod tests {
|
||||||
// Assert
|
// Assert
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[tokio::test]
|
||||||
async fn send_email_succeeds_if_the_server_returns_200() {
|
async fn send_email_succeeds_if_the_server_returns_200() {
|
||||||
// Arrange
|
// Arrange
|
||||||
let mock_server = MockServer::start().await;
|
let mock_server = MockServer::start().await;
|
||||||
|
@ -141,7 +141,7 @@ mod tests {
|
||||||
assert_ok!(outcome);
|
assert_ok!(outcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[tokio::test]
|
||||||
async fn send_email_fails_if_the_server_returns_500() {
|
async fn send_email_fails_if_the_server_returns_500() {
|
||||||
// Arrange
|
// Arrange
|
||||||
let mock_server = MockServer::start().await;
|
let mock_server = MockServer::start().await;
|
||||||
|
|
Loading…
Reference in a new issue