You've already forked AstralRinth
forked from didirus/AstralRinth
changes tests to a macro (#822)
This commit is contained in:
@@ -7,8 +7,6 @@ use common::api_v3::ApiV3;
|
||||
use common::database::USER_USER_PAT;
|
||||
use common::environment::{with_test_environment, TestEnvironment};
|
||||
|
||||
use crate::common::asserts::assert_status;
|
||||
|
||||
mod common;
|
||||
|
||||
#[actix_rt::test]
|
||||
@@ -17,7 +15,7 @@ pub async fn error_404_body() {
|
||||
// 3 errors should have 404 as non-blank body, for missing resources
|
||||
let api = &test_env.api;
|
||||
let resp = api.get_project("does-not-exist", USER_USER_PAT).await;
|
||||
assert_status(&resp, StatusCode::NOT_FOUND);
|
||||
assert_status!(&resp, StatusCode::NOT_FOUND);
|
||||
let body = test::read_body(resp).await;
|
||||
let empty_bytes = Bytes::from_static(b"");
|
||||
assert_ne!(body, empty_bytes);
|
||||
|
||||
Reference in New Issue
Block a user