Skip to content

Commit a44d0a7

Browse files
committed
Fixed test
1 parent efd43cf commit a44d0a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/LinkDotNet.Blog.IntegrationTests/Web/Pages/Admin/CreateNewBlogPostPageTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
using LinkDotNet.Blog.Domain;
77
using LinkDotNet.Blog.Infrastructure.Persistence;
88
using LinkDotNet.Blog.Web.Pages.Admin;
9+
using LinkDotNet.Blog.Web.Shared;
910
using LinkDotNet.Blog.Web.Shared.Admin;
11+
using LinkDotNet.Blog.Web.Shared.Services;
1012
using Microsoft.EntityFrameworkCore;
1113
using Microsoft.Extensions.DependencyInjection;
1214
using Moq;
@@ -24,6 +26,8 @@ public async Task ShouldSaveBlogPostOnSave()
2426
ctx.AddTestAuthorization().SetAuthorized("some username");
2527
ctx.Services.AddScoped<IRepository<BlogPost>>(_ => Repository);
2628
ctx.Services.AddScoped(_ => toastService.Object);
29+
ctx.ComponentFactories.AddStub<UploadFile>();
30+
ctx.Services.AddScoped(_ => new Mock<IFileProcessor>().Object);
2731
using var cut = ctx.RenderComponent<CreateNewBlogPostPage>();
2832
var newBlogPost = cut.FindComponent<CreateNewBlogPost>();
2933

@@ -46,4 +50,4 @@ private static void TriggerNewBlogPost(IRenderedComponent<CreateNewBlogPost> cut
4650

4751
cut.Find("form").Submit();
4852
}
49-
}
53+
}

0 commit comments

Comments
 (0)