Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion SW.Bitween.IntegrationTests/Tests/AuditTrailTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ public async Task An_account_password_never_reaches_the_trail()
var entry = await SingleEntryFor(db, nameof(Account), account.Id.ToString());

Assert.DoesNotContain("hashed-password-should-never-be-stored", entry.Changes);
Assert.DoesNotContain(nameof(Account.Password), entry.Changes);
// Asked of the parsed changes rather than the serialized string: "Password" is a substring
// of MustChangePassword, which is an ordinary audited flag, so searching the JSON text
// reported a leak the moment a second property happened to contain the word.
Assert.DoesNotContain(nameof(Account.Password), Changes(entry).Keys);
Assert.Equal("Audited Account", Changes(entry)[nameof(Account.DisplayName)].New);
}

Expand Down
Loading