mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Fix beatmap date added not being updated on reimporting a soft deleted beatmap
Addresses concerns raised in https://github.com/ppy/osu/discussions/17399.
This commit is contained in:
@ -590,6 +590,8 @@ namespace osu.Game.Tests.Database
|
||||
|
||||
Assert.IsTrue(imported.DeletePending);
|
||||
|
||||
var originalAddedDate = imported.DateAdded;
|
||||
|
||||
var importedSecondTime = await LoadOszIntoStore(importer, realm.Realm);
|
||||
|
||||
// check the newly "imported" beatmap is actually just the restored previous import. since it matches hash.
|
||||
@ -597,6 +599,7 @@ namespace osu.Game.Tests.Database
|
||||
Assert.IsTrue(imported.Beatmaps.First().ID == importedSecondTime.Beatmaps.First().ID);
|
||||
Assert.IsFalse(imported.DeletePending);
|
||||
Assert.IsFalse(importedSecondTime.DeletePending);
|
||||
Assert.That(importedSecondTime.DateAdded, Is.GreaterThan(originalAddedDate));
|
||||
});
|
||||
}
|
||||
|
||||
@ -646,6 +649,8 @@ namespace osu.Game.Tests.Database
|
||||
|
||||
Assert.IsTrue(imported.DeletePending);
|
||||
|
||||
var originalAddedDate = imported.DateAdded;
|
||||
|
||||
var importedSecondTime = await LoadOszIntoStore(importer, realm.Realm);
|
||||
|
||||
// check the newly "imported" beatmap is actually just the restored previous import. since it matches hash.
|
||||
@ -653,6 +658,7 @@ namespace osu.Game.Tests.Database
|
||||
Assert.IsTrue(imported.Beatmaps.First().ID == importedSecondTime.Beatmaps.First().ID);
|
||||
Assert.IsFalse(imported.DeletePending);
|
||||
Assert.IsFalse(importedSecondTime.DeletePending);
|
||||
Assert.That(importedSecondTime.DateAdded, Is.GreaterThan(originalAddedDate));
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user