Skip to content

Commit

Permalink
Add test coverage of failure scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed Dec 28, 2023
1 parent 8e3fe09 commit 68402bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osu.Game.Tests/Visual/Menus/TestSceneMainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public void TestSystemTitle()
Image = @"https://assets.ppy.sh/main-menu/wf2023-vote@2x.png",
Url = @"https://osu.ppy.sh/community/contests/189",
});
AddStep("set title with nonexistent image", () => Game.ChildrenOfType<SystemTitle>().Single().Current.Value = new APISystemTitle
{
Image = @"https://test.invalid/@2x", // .invalid TLD reserved by https://datatracker.ietf.org/doc/html/rfc2606#section-2
Url = @"https://osu.ppy.sh/community/contests/189",
});
AddStep("unset system title", () => Game.ChildrenOfType<SystemTitle>().Single().Current.Value = null);
}
}
Expand Down

0 comments on commit 68402bf

Please sign in to comment.