Skip to content

Commit

Permalink
chore(test): fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Nov 17, 2020
1 parent 60a33bb commit 5b75aa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void success() {
assertThat(roles, hasItem("topic/read"));
assertThat(roles, hasItem("registry/version/delete"));

assertEquals("test.*", ((List)userDetail.getAttributes("roles", "username").get("topics-filter-regexp")).get(0));
assertEquals("test.*", ((List)userDetail.getAttributes("roles", "username").get("topicsFilterRegexp")).get(0));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void success() throws NamingException {
assertThat(roles, hasItem("topic/read"));
assertThat(roles, hasItem("registry/version/delete"));

assertEquals("test.*", ((List)userDetail.getAttributes("roles", "username").get("topics-filter-regexp")).get(0));
assertEquals("test.*", ((List)userDetail.getAttributes("roles", "username").get("topicsFilterRegexp")).get(0));
}

@Test
Expand Down Expand Up @@ -127,7 +127,7 @@ public void successWithMultipleLdapGroups() throws NamingException {
assertThat(roles, hasItem("registry/version/delete"));
assertThat(roles, hasItem("topic/data/read"));

List<String> topicsFilterList = (List)(userDetail.getAttributes("roles", "username").get("topics-filter-regexp"));
List<String> topicsFilterList = (List)(userDetail.getAttributes("roles", "username").get("topicsFilterRegexp"));
assertThat(topicsFilterList, hasSize(2));
assertThat(topicsFilterList, hasItem("test.*"));
assertThat(topicsFilterList, hasItem("test-operator.*"));
Expand Down Expand Up @@ -166,7 +166,7 @@ public void successWithLdapGroupAndUserRole() throws NamingException {
assertThat(roles, hasItem("registry/version/delete"));
assertThat(roles, hasItem("topic/data/read"));

List<String> topicsFilterList = (List)(userDetail.getAttributes("roles", "username").get("topics-filter-regexp"));
List<String> topicsFilterList = (List)(userDetail.getAttributes("roles", "username").get("topicsFilterRegexp"));
assertThat(topicsFilterList, hasSize(2));
assertThat(topicsFilterList, hasItem("test.*"));
assertThat(topicsFilterList, hasItem("test-operator.*"));
Expand Down

0 comments on commit 5b75aa2

Please sign in to comment.