Skip to content

Commit

Permalink
Actually fix tests
Browse files Browse the repository at this point in the history
I ran them
  • Loading branch information
golf1052 committed Jun 21, 2024
1 parent 22f60a3 commit 7bca2c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using golf1052.Mastodon.Models.Statuses;
using golf1052.Mastodon.Models.Statuses.Media;
using golf1052.ThreadsAPI;
using golf1052.ThreadsAPI.Models;
using Imgur.API.Authentication;
using Imgur.API.Endpoints;
using Imgur.API.Models;
Expand Down Expand Up @@ -97,6 +98,22 @@ public AdminPageControllerTests()
mockHttpMessageHandler.CreateClient());
mockBlueskyClient = new Mock<AtProtoClient>(mockHttpMessageHandler.CreateClient(), null!, null!);
mockThreadsClient = new Mock<ThreadsClient>("clientId", "clientSecret", mockHttpMessageHandler.CreateClient());
mockThreadsClient.Setup(c => c.CreateThreadsMediaContainer(It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<bool>(),
It.IsAny<List<string>>()).Result)
.Returns("001");
mockThreadsClient.Setup(c => c.PublishThreadsMediaContainer(It.IsAny<string>()).Result)
.Returns("002");
mockThreadsClient.Setup(c => c.GetThreadsMediaObject(It.IsAny<string>(), It.IsAny<string>()).Result)
.Returns(new ThreadsMediaObject()
{
Id = "002",
Permalink = "https://threads.net/002"
});

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 Down
2 changes: 1 addition & 1 deletion SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +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="golf1052.ThreadsAPI" Version="0.1.1" />
<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 7bca2c2

Please sign in to comment.