Skip to content

Commit

Permalink
Add one more unit test for AuthResource
Browse files Browse the repository at this point in the history
  • Loading branch information
ligangty committed Jan 15, 2024
1 parent 98dfca9 commit cc98898
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,13 @@ public void testGetUserInfo()
assertThat( resultPath.getInt( "roles.size" ), is( 2 ) );
assertThat( resultPath.getList( "roles" ), hasItems( "power", "admin" ) );
}

@Test
public void testGetUserInfoNotAuth()
{
given().when()
.get( "/api/admin/auth/userinfo" )
.then()
.statusCode( Response.Status.UNAUTHORIZED.getStatusCode() );
}
}

0 comments on commit cc98898

Please sign in to comment.