Fix incorrect substitution of enumeration key names for capability names
This commit is contained in:
		
							parent
							
								
									f5a93574f6
								
							
						
					
					
						commit
						4af576668c
					
				|  | @ -492,6 +492,6 @@ public class ProfileController { | ||||||
|   private static Map<String, Boolean> getAccountCapabilities(final Account account) { |   private static Map<String, Boolean> getAccountCapabilities(final Account account) { | ||||||
|     return Arrays.stream(DeviceCapability.values()) |     return Arrays.stream(DeviceCapability.values()) | ||||||
|         .filter(DeviceCapability::includeInProfile) |         .filter(DeviceCapability::includeInProfile) | ||||||
|         .collect(Collectors.toMap(Enum::name, account::hasCapability)); |         .collect(Collectors.toMap(DeviceCapability::getName, account::hasCapability)); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -452,8 +452,8 @@ class ProfileControllerTest { | ||||||
|         .header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD)) |         .header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD)) | ||||||
|         .get(BaseProfileResponse.class); |         .get(BaseProfileResponse.class); | ||||||
| 
 | 
 | ||||||
|     assertEquals(isDeleteSyncSupported, profile.getCapabilities().get(DeviceCapability.DELETE_SYNC.name())); |     assertEquals(isDeleteSyncSupported, profile.getCapabilities().get("deleteSync")); | ||||||
|     assertEquals(isVersionedExpirationTimerSupported, profile.getCapabilities().get(DeviceCapability.VERSIONED_EXPIRATION_TIMER.name())); |     assertEquals(isVersionedExpirationTimerSupported, profile.getCapabilities().get("versionedExpirationTimer")); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   @Test |   @Test | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Jon Chambers
						Jon Chambers