postit: point Register button at /Account/Register
/signin only renders the local-account sign-in form on Yavsc.Org; new accounts live at /Account/Register. Update RegisterUrl in LoginPageViewModel and the matching test accordingly.
This commit is contained in:
parent
36e179c494
commit
9e190e3d3d
5 changed files with 98 additions and 13 deletions
36
src/PostIt.Tests/SettingsLoadTests.cs
Normal file
36
src/PostIt.Tests/SettingsLoadTests.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace PostIt.Tests;
|
||||
|
||||
public class SettingsLoadTests
|
||||
{
|
||||
/// <summary>
|
||||
/// On the dev machine, the user-level settings file
|
||||
/// (~/.config/PostIt/postit-settings.json) does not exist, so Load()
|
||||
/// must fall back to the embedded default resource shipped inside
|
||||
/// PostIt.dll.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Load_falls_back_to_embedded_resource_when_user_file_missing()
|
||||
{
|
||||
// Skip if a user-level file exists (CI / different dev machines).
|
||||
var userConfigPath = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
"PostIt",
|
||||
"postit-settings.json");
|
||||
if (File.Exists(userConfigPath))
|
||||
{
|
||||
return; // nothing to assert: user file wins.
|
||||
}
|
||||
|
||||
var settings = new PostIt.Settings();
|
||||
await settings.Load();
|
||||
|
||||
// The bundled postit-settings.json points at yavsc.pschneider.fr.
|
||||
Assert.False(string.IsNullOrWhiteSpace(settings.Authentication?.Authority));
|
||||
Assert.Equal("postit", settings.Authentication.ClientId);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue