This commit is contained in:
Wyatt Verchere
2023-12-13 17:08:58 -07:00
committed by GitHub
parent c0c5978028
commit 50e89ad98b
4 changed files with 17 additions and 8 deletions

View File

@@ -186,7 +186,7 @@ impl ValidateAuthorized for models::OAuthClient {
"You don't have sufficient permissions to interact with this OAuth application"
.to_string(),
))
}
};
}
Ok(())

View File

@@ -1120,7 +1120,7 @@ async fn align_search_projects() {
let projects = api
.search_deserialized(
Some(&test_name),
Some(&format!("\"&{test_name}\"")),
Some(json!([["categories:fabric"]])),
USER_USER_PAT,
)
@@ -1130,6 +1130,7 @@ async fn align_search_projects() {
let project_model = api
.get_project(&project.id.to_string(), USER_USER_PAT)
.await;
assert_eq!(project_model.status(), 200);
let mut project_model: Project = test::read_body_json(project_model).await;
// Body/description is huge- don't store it in search, so it's OK if they differ here

View File

@@ -91,7 +91,11 @@ async fn search_projects() {
let test_name = test_name.clone();
async move {
let projects = api
.search_deserialized(Some(&test_name), Some(facets.clone()), USER_USER_PAT)
.search_deserialized(
Some(&format!("\"&{test_name}\"")),
Some(facets.clone()),
USER_USER_PAT,
)
.await;
let mut found_project_ids: Vec<u64> = projects
.hits

View File

@@ -292,7 +292,11 @@ async fn search_projects() {
let test_name = test_name.clone();
async move {
let projects = api
.search_deserialized(Some(&test_name), Some(facets.clone()), USER_USER_PAT)
.search_deserialized(
Some(&format!("\"&{test_name}\"")),
Some(facets.clone()),
USER_USER_PAT,
)
.await;
let mut found_project_ids: Vec<u64> = projects
.hits
@@ -309,7 +313,7 @@ async fn search_projects() {
// A couple additional tests for the saerch type returned, making sure it is properly translated back
let client_side_required = api
.search_deserialized(
Some(&test_name),
Some(&format!("\"&{test_name}\"")),
Some(json!([["client_side:required"]])),
USER_USER_PAT,
)
@@ -320,7 +324,7 @@ async fn search_projects() {
let server_side_required = api
.search_deserialized(
Some(&test_name),
Some(&format!("\"&{test_name}\"")),
Some(json!([["server_side:required"]])),
USER_USER_PAT,
)
@@ -331,7 +335,7 @@ async fn search_projects() {
let client_side_unsupported = api
.search_deserialized(
Some(&test_name),
Some(&format!("\"&{test_name}\"")),
Some(json!([["client_side:unsupported"]])),
USER_USER_PAT,
)
@@ -342,7 +346,7 @@ async fn search_projects() {
let game_versions = api
.search_deserialized(
Some(&test_name),
Some(&format!("\"&{test_name}\"")),
Some(json!([["versions:1.20.5"]])),
USER_USER_PAT,
)