Skip to content

Commit

Permalink
fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmer committed Dec 18, 2024
1 parent d2a87ef commit e8dc042
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions test/unit_test/api/privacy_idea_container_api_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void _testPrivacyIdeaContainerApi() {
}
final publicEncKeyClientB64 = invocationBody['public_enc_key_client'];
final containerDictClient =
'{"serial":"SMPH00067A2F","type":"smartphone","tokens":[{"6":"HOTP","label":"label1","issuer":"privacyIDEA","pin":"False","algorithm":"SHA1","digits":"6","otp":["435986","964213"],"counter":"5"}]}';
'{"serial":"SMPH00067A2F","type":"smartphone","tokens":[{"tokentype":"HOTP","label":"label1","issuer":"privacyIDEA","pin":"False","algorithm":"SHA1","digits":"6","otp":["435986","964213"],"counter":"5"}]}';

final signMessage2 = '$containerChallengeNonce|'
'$containerChallengeTimeStamp|'
Expand Down Expand Up @@ -975,34 +975,6 @@ void _testPrivacyIdeaContainerApi() {
// Act & Assert
expect(() => containerApi.getRolloverQrData(tokenContainer), throwsA(isA<Exception>()));
});
test('finalizeContainer', () {
// Arrange
final containerApi = PiContainerApi(ioClient: MockPrivacyideaIOClient());
final tokenContainer = getNewTokenContainer(
withPolicies: ContainerPolicies(
rolloverAllowed: true,
initialTokenTransfer: true,
tokensDeletable: true,
unregisterAllowed: false,
),
);
// Act & Assert
expect(() => containerApi.finalizeContainer(tokenContainer), throwsA(isA<Exception>()));
});
test('rollover', () {
// Arrange
final containerApi = PiContainerApi(ioClient: MockPrivacyideaIOClient());
final tokenContainer = getFinalizedTokenContainer(
withPolicies: ContainerPolicies(
rolloverAllowed: false,
initialTokenTransfer: true,
tokensDeletable: true,
unregisterAllowed: true,
),
);
// Act & Assert
expect(() => containerApi.getRolloverQrData(tokenContainer), throwsA(isA<Exception>()));
});

test('unregister', () {
// Arrange
Expand Down

0 comments on commit e8dc042

Please sign in to comment.