Skip to content

Commit

Permalink
test(ZNTA-2380): unauthenticated permission requests give 403 response
Browse files Browse the repository at this point in the history
  • Loading branch information
efloden committed Feb 27, 2018
1 parent 2b8fff1 commit d50c532
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -63,6 +63,16 @@ public void setUp() throws Exception {
applicationConfiguration, identityManager);
}

@Test
public void getTranslationPermissionWillReturnForbiddenIfNotAuthenticated() {
String projectSlug = "projectSlug";
String localeId = "localeId";
service = new UserService(null, gravatarService, accountDAO, personDAO,
projectDAO, identity, applicationConfiguration, identityManager);
Response response = service.getTranslationPermission(projectSlug, localeId);
assertThat(response.getStatus()).isEqualTo(403);
}

@Test
public void getMyInfoWillReturnNotFoundIfNotAuthenticated() {
service = new UserService(null, gravatarService, accountDAO, personDAO,
Expand Down

0 comments on commit d50c532

Please sign in to comment.