Files
quiver-launcher/QuiverLauncher.Tests/UpdatePromptPolicyTests.cs
T
Thomas GeorgiadisandCursor 73806902d0 feat: ship Quiver Launcher v3.1.0
Catalog review search and tag filters, multi-file GameBanana mods, and new library settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 20:29:14 +10:00

45 lines
1.6 KiB
C#

using FluentAssertions;
using QuiverLauncher.Services;
namespace QuiverLauncher.Tests;
public class UpdatePromptPolicyTests
{
[Fact]
public void New_settings_default_to_quiet_catalog_and_app_prompts_with_badges_on()
{
var settings = new AppSettings();
settings.PromptCatalogUpdates.Should().BeFalse();
settings.PromptAppUpdateReviews.Should().BeFalse();
settings.ShowLibraryAppUpdateBadges.Should().BeTrue();
}
[Fact]
public void ShouldPromptCatalogUpdates_follows_setting()
{
UpdatePromptPolicy.ShouldPromptCatalogUpdates(null).Should().BeFalse();
UpdatePromptPolicy.ShouldPromptCatalogUpdates(new AppSettings()).Should().BeFalse();
UpdatePromptPolicy.ShouldPromptCatalogUpdates(new AppSettings { PromptCatalogUpdates = true })
.Should().BeTrue();
}
[Fact]
public void ShouldPromptAppUpdateReviews_follows_setting()
{
UpdatePromptPolicy.ShouldPromptAppUpdateReviews(null).Should().BeFalse();
UpdatePromptPolicy.ShouldPromptAppUpdateReviews(new AppSettings()).Should().BeFalse();
UpdatePromptPolicy.ShouldPromptAppUpdateReviews(new AppSettings { PromptAppUpdateReviews = true })
.Should().BeTrue();
}
[Fact]
public void ShouldShowLibraryAppUpdateBadges_defaults_on()
{
UpdatePromptPolicy.ShouldShowLibraryAppUpdateBadges(null).Should().BeTrue();
UpdatePromptPolicy.ShouldShowLibraryAppUpdateBadges(new AppSettings()).Should().BeTrue();
UpdatePromptPolicy.ShouldShowLibraryAppUpdateBadges(new AppSettings { ShowLibraryAppUpdateBadges = false })
.Should().BeFalse();
}
}