Add category to badges

This commit is contained in:
Ehren Kret
2021-09-15 17:34:16 -05:00
parent ce3835e176
commit 08c6a8c2e5
6 changed files with 34 additions and 13 deletions

View File

@@ -72,7 +72,7 @@ public class ConfiguredProfileBadgeConverterTest {
}
private static BadgeConfiguration newBadge(int i) {
return new BadgeConfiguration(idFor(i), imageUrlFor(i));
return new BadgeConfiguration(idFor(i), imageUrlFor(i), "other");
}
private BadgesConfiguration createBadges(int count) {
@@ -140,7 +140,7 @@ public class ConfiguredProfileBadgeConverterTest {
arguments(idFor(0), expired, false, null),
arguments(idFor(0), notExpired, false, null),
arguments(idFor(0), expired, true, null),
arguments(idFor(0), notExpired, true, new Badge(idFor(0), imageUrlFor(0), nameFor(0), desriptionFor(0))),
arguments(idFor(0), notExpired, true, new Badge(idFor(0), "other", imageUrlFor(0), nameFor(0), desriptionFor(0))),
arguments(idFor(1), expired, false, null),
arguments(idFor(1), notExpired, false, null),
arguments(idFor(1), expired, true, null),

View File

@@ -104,7 +104,7 @@ class ProfileControllerTest {
(acceptableLanguages, accountBadges) -> {
try {
return List.of(
new Badge("TEST1", new URL("https://example.com/badge/1"), "Test Badge", "This badge is in unit tests.")
new Badge("TEST1", "other", new URL("https://example.com/badge/1"), "Test Badge", "This badge is in unit tests.")
);
} catch (MalformedURLException e) {
throw new AssertionError(e);