Merge branch 'fix/postit-acl-and-pub' into release/1.0.8-rc6
This commit is contained in:
commit
a426c47006
16 changed files with 385 additions and 229 deletions
|
|
@ -81,7 +81,7 @@ public class MainPageSaveTests
|
|||
Assert.NotEmpty(recorder.Calls);
|
||||
var (method, path, body) = recorder.FirstCall;
|
||||
Assert.Equal(HttpMethod.Post, method);
|
||||
Assert.Equal("blog", path);
|
||||
Assert.Equal("blogspot", path);
|
||||
var sent = Assert.IsType<BlogPostDto>(body);
|
||||
Assert.Equal(typed, sent.Title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using System.Text.Json;
|
||||
|
||||
namespace PostIt.Tests;
|
||||
|
||||
public class SettingsLoadTests
|
||||
|
|
@ -149,4 +151,26 @@ public class SettingsLoadTests
|
|||
|
||||
Assert.True(settings.Loaded);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SearchText_is_serialized_in_settings_and_round_trips()
|
||||
{
|
||||
var settings = new PostIt.ViewModels.Settings
|
||||
{
|
||||
Authentication = new AuthenticationSettings
|
||||
{
|
||||
Authority = "https://example.test/",
|
||||
ClientId = "postit-tests",
|
||||
Scopes = new[] { "openid" }
|
||||
}
|
||||
};
|
||||
|
||||
settings.SearchText = "bonjour";
|
||||
|
||||
var json = JsonSerializer.Serialize(settings);
|
||||
var roundTrip = JsonSerializer.Deserialize<PostIt.ViewModels.Settings>(json);
|
||||
|
||||
Assert.NotNull(roundTrip);
|
||||
Assert.Equal("bonjour", roundTrip.SearchText);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue