Skip to content

Commit d955a40

Browse files
author
hikaps
committed
fix(test): update test for new shortcuts.vdf auto-create behavior
1 parent 6411636 commit d955a40

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/ShortcutsTests/SteamPathResolverTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,20 @@ public void ResolveShortcutsVdfPath_NoUserData_ReturnsNull()
9595
}
9696

9797
[Fact]
98-
public void ResolveShortcutsVdfPath_NoConfigDir_ReturnsNull()
98+
public void ResolveShortcutsVdfPath_NoConfigDir_ReturnsPathForCreation()
9999
{
100100
var tempRoot = Path.Combine(Path.GetTempPath(), "steam_test_" + Guid.NewGuid().ToString("N"));
101101
try
102102
{
103103
var userDataDir = Path.Combine(tempRoot, "userdata", "12345");
104104
Directory.CreateDirectory(userDataDir);
105-
// No config directory
105+
// No config directory - should still return a path for creation
106106

107107
var resolver = new SteamPathResolver(tempRoot);
108108
var result = resolver.ResolveShortcutsVdfPath();
109109

110-
Assert.Null(result);
110+
Assert.NotNull(result);
111+
Assert.EndsWith(Path.Combine("12345", "config", "shortcuts.vdf"), result);
111112
}
112113
finally
113114
{

0 commit comments

Comments
 (0)