mirror of
https://github.com/tgeorgiadis/quiver-launcher.git
synced 2026-12-06 11:47:59 -05:00
Catalog review search and tag filters, multi-file GameBanana mods, and new library settings. Co-authored-by: Cursor <cursoragent@cursor.com>
45 lines
1.6 KiB
C#
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();
|
|
}
|
|
}
|