Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jun 8, 2024
1 parent 86cf971 commit 9fbae12
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/routes/v3/oauth_clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ pub async fn oauth_client_edit(
.validate()
.map_err(|e| ApiError::Validation(validation_errors_to_string(e, None)))?;

if client_updates.name.is_none() && client_updates.max_scopes.is_none() {
return Err(ApiError::InvalidInput("No changes provided".to_string()));
}

if let Some(existing_client) = OAuthClient::get(client_id.into_inner().into(), &**pool).await? {
existing_client.validate_authorized(Some(&current_user))?;

Expand Down
3 changes: 0 additions & 3 deletions tests/oauth_clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ async fn can_create_edit_get_oauth_client() {
let creation_result: OAuthClientCreationResult = test::read_body_json(resp).await;
let client_id = get_json_val_str(creation_result.client.id);

let icon_url = Some("https://modrinth.com/icon".to_string());
let url = Some("https://modrinth.com".to_string());
let description = Some("test description".to_string());
let edited_redirect_uris = vec![
Expand All @@ -49,7 +48,6 @@ async fn can_create_edit_get_oauth_client() {
];
let edit = OAuthClientEdit {
name: None,
icon_url: Some(icon_url.clone()),
max_scopes: None,
redirect_uris: Some(edited_redirect_uris.clone()),
url: Some(url.clone()),
Expand All @@ -66,7 +64,6 @@ async fn can_create_edit_get_oauth_client() {
.get_user_oauth_clients(FRIEND_USER_ID, FRIEND_USER_PAT)
.await;
assert_eq!(1, clients.len());
assert_eq!(icon_url, clients[0].icon_url);
assert_eq!(url, clients[0].url);
assert_eq!(description, clients[0].description);
assert_eq!(client_name, clients[0].name);
Expand Down

0 comments on commit 9fbae12

Please sign in to comment.