mirror of https://github.com/ppy/osu
Fix test that never should have worked
This was only working by luck until now. It was "correctly" matching on
null online ID (see logic at
abc96057b2/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs (L199-L207)
).
Now it works by actually matching on the online ID.
This commit is contained in:
parent
f6180b7e6a
commit
1bbfbb0d8e
|
@ -111,10 +111,27 @@ public void TestPlaylistItemSelectedOnCreate()
|
|||
public void TestBeatmapUpdatedOnReImport()
|
||||
{
|
||||
BeatmapSetInfo importedSet = null;
|
||||
TestBeatmap beatmap = null;
|
||||
|
||||
// this step is required to make sure the further imports actually get online IDs.
|
||||
// all the playlist logic relies on online ID matching.
|
||||
AddStep("remove all matching online IDs", () =>
|
||||
{
|
||||
beatmap = new TestBeatmap(new OsuRuleset().RulesetInfo);
|
||||
|
||||
var existing = manager.QueryBeatmapSets(s => s.OnlineBeatmapSetID == beatmap.BeatmapInfo.BeatmapSet.OnlineBeatmapSetID).ToList();
|
||||
|
||||
foreach (var s in existing)
|
||||
{
|
||||
s.OnlineBeatmapSetID = null;
|
||||
foreach (var b in s.Beatmaps)
|
||||
b.OnlineBeatmapID = null;
|
||||
manager.Update(s);
|
||||
}
|
||||
});
|
||||
|
||||
AddStep("import altered beatmap", () =>
|
||||
{
|
||||
var beatmap = new TestBeatmap(new OsuRuleset().RulesetInfo);
|
||||
beatmap.BeatmapInfo.BaseDifficulty.CircleSize = 1;
|
||||
|
||||
importedSet = manager.Import(beatmap.BeatmapInfo.BeatmapSet).Result;
|
||||
|
|
Loading…
Reference in New Issue