postit: persist settings save and apply ApiUrl changes without restart
All checks were successful
Forgejo Release / release (push) Successful in 11m52s
All checks were successful
Forgejo Release / release (push) Successful in 11m52s
This commit is contained in:
parent
daf766d762
commit
bff7cff59f
8 changed files with 84 additions and 30 deletions
|
|
@ -39,6 +39,22 @@ public class ActivitiesPageViewModelTests
|
|||
Assert.Equal("https://business.example/api/v1/billing/Rdv", api.Paths[3]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ActivityApiClient_uses_updated_business_base_without_restart()
|
||||
{
|
||||
var api = new StubActivityApi();
|
||||
var baseUrl = "https://business-a.example/api/v1/";
|
||||
var client = new ActivityApiClient(api, () => baseUrl);
|
||||
|
||||
await client.GetCatalogAsync(ct: TestContext.Current.CancellationToken);
|
||||
|
||||
baseUrl = "https://business-b.example/api/v1/";
|
||||
await client.GetUsersAsync("brush", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.Equal("https://business-a.example/api/v1/activity/catalog", api.Paths[0]);
|
||||
Assert.Equal("https://business-b.example/api/v1/activity/brush/users", api.Paths[1]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task RefreshAsync_loads_first_activity_then_specialization_performers()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue