@@ -307,7 +307,7 @@ public async Task PostKdf_ChangedSaltInAuthenticationData_BadRequest()
307307
308308 Assert . Equal ( HttpStatusCode . BadRequest , response . StatusCode ) ;
309309 var content = await response . Content . ReadAsStringAsync ( ) ;
310- Assert . Contains ( "AuthenticationData and UnlockData must have the same salt." , content ) ;
310+ Assert . Contains ( "Invalid master password salt." , content ) ;
311311 }
312312
313313 [ Fact ]
@@ -333,7 +333,7 @@ public async Task PostKdf_ChangedSaltInUnlockData_BadRequest()
333333
334334 Assert . Equal ( HttpStatusCode . BadRequest , response . StatusCode ) ;
335335 var content = await response . Content . ReadAsStringAsync ( ) ;
336- Assert . Contains ( "AuthenticationData and UnlockData must have the same salt." , content ) ;
336+ Assert . Contains ( "Invalid master password salt." , content ) ;
337337 }
338338
339339 [ Fact ]
@@ -363,10 +363,10 @@ public async Task PostKdf_KdfNotMatching_BadRequest()
363363 }
364364
365365 [ Theory ]
366- [ InlineData ( KdfType . PBKDF2_SHA256 , 1 , null , null ) ]
367- [ InlineData ( KdfType . Argon2id , 4 , null , 5 ) ]
368- [ InlineData ( KdfType . Argon2id , 4 , 65 , null ) ]
369- public async Task PostKdf_InvalidKdf_BadRequest ( KdfType kdf , int kdfIterations , int ? kdfMemory , int ? kdfParallelism )
366+ [ InlineData ( KdfType . PBKDF2_SHA256 , 1 , null , null , "KDF iterations must be between" ) ]
367+ [ InlineData ( KdfType . Argon2id , 4 , null , 5 , "Argon2 memory must be between" ) ]
368+ [ InlineData ( KdfType . Argon2id , 4 , 65 , null , "Argon2 parallelism must be between" ) ]
369+ public async Task PostKdf_InvalidKdf_BadRequest ( KdfType kdf , int kdfIterations , int ? kdfMemory , int ? kdfParallelism , string expectedError )
370370 {
371371 await _loginHelper . LoginAsync ( _ownerEmail ) ;
372372
@@ -382,7 +382,7 @@ public async Task PostKdf_InvalidKdf_BadRequest(KdfType kdf, int kdfIterations,
382382
383383 Assert . Equal ( HttpStatusCode . BadRequest , response . StatusCode ) ;
384384 var content = await response . Content . ReadAsStringAsync ( ) ;
385- Assert . Contains ( "KDF settings are invalid." , content ) ;
385+ Assert . Contains ( expectedError , content ) ;
386386 }
387387
388388 [ Fact ]
0 commit comments