Skip to content

Commit

Permalink
Merge pull request #153 from ligangty/auth
Browse files Browse the repository at this point in the history
Add one more unit test for AuthResource
  • Loading branch information
ligangty authored Jan 15, 2024
2 parents 98dfca9 + cc98898 commit ff92e03
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 ff92e03

Please sign in to comment.