Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Also for some reason the Threads API package didn't get included
  • Loading branch information
golf1052 committed Jun 20, 2024
1 parent bd67240 commit 22f60a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using golf1052.Mastodon;
using golf1052.Mastodon.Models.Statuses;
using golf1052.Mastodon.Models.Statuses.Media;
using golf1052.ThreadsAPI;
using Imgur.API.Authentication;
using Imgur.API.Endpoints;
using Imgur.API.Models;
Expand Down Expand Up @@ -49,6 +50,7 @@ public class AdminPageControllerTests
private Mock<BlueskyClientProvider>? mockBlueskyClientProvider;
private Mock<MastodonClient>? mockMastodonClient;
private Mock<AtProtoClient>? mockBlueskyClient;
private Mock<ThreadsClient>? mockThreadsClient;

public AdminPageControllerTests()
{
Expand Down Expand Up @@ -94,6 +96,7 @@ public AdminPageControllerTests()
mockMastodonClient = new Mock<MastodonClient>("https://mastodon.social",
mockHttpMessageHandler.CreateClient());
mockBlueskyClient = new Mock<AtProtoClient>(mockHttpMessageHandler.CreateClient(), null!, null!);
mockThreadsClient = new Mock<ThreadsClient>("clientId", "clientSecret", mockHttpMessageHandler.CreateClient());

mockSecretClient.Setup(m => m.GetSecret(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(Azure.Response.FromValue(SecretModelFactory.KeyVaultSecret(new SecretProperties("test"), "test"), Mock.Of<Azure.Response>()));
Expand All @@ -108,7 +111,8 @@ public AdminPageControllerTests()
mapsSearchClient,
mockMastodonClientProvider.Object,
mockFeedProvider.Object,
mockBlueskyClientProvider.Object);
mockBlueskyClientProvider.Object,
mockThreadsClient.Object);
}

[Fact]
Expand Down
1 change: 1 addition & 0 deletions SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
<PackageReference Include="golf1052.atproto.net" Version="0.3.0" />
<PackageReference Include="golf1052.Mastodon" Version="0.7.1" />
<PackageReference Include="golf1052.ThreadsAPI" Version="0.1.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.57" />
<PackageReference Include="idunno.Authentication.Basic" Version="2.3.1" />
<PackageReference Include="Imgur.API" Version="5.0.0" />
Expand Down

0 comments on commit 22f60a3

Please sign in to comment.