1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Use IHttpClientFactory in more places

This commit is contained in:
Justin Baur
2025-05-01 08:59:15 -04:00
parent 7a99f5dc5d
commit 284501a493
7 changed files with 44 additions and 25 deletions

View File

@ -31,12 +31,18 @@ public class FreshsalesControllerTests
var globalSettings = new GlobalSettings();
globalSettings.BaseServiceUri.Admin = "https://test.com";
var httpClientFactory = Substitute.For<IHttpClientFactory>();
httpClientFactory
.CreateClient("Freshsales")
.Returns(new HttpClient());
var sut = new FreshsalesController(
userRepository,
organizationRepository,
billingSettings,
Substitute.For<ILogger<FreshsalesController>>(),
globalSettings
globalSettings,
httpClientFactory
);
return (sut, userRepository, organizationRepository);