aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs')
-rw-r--r--Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs b/Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs
index a7616b41..aa005ba3 100644
--- a/Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs
+++ b/Timeline.Tests/Helpers/WebApplicationFactoryExtensions.cs
@@ -1,9 +1,11 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Testing;
+using Microsoft.AspNetCore.TestHost;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Timeline.Models;
+using Timeline.Services;
using Xunit.Abstractions;
namespace Timeline.Tests.Helpers
@@ -46,6 +48,10 @@ namespace Timeline.Tests.Helpers
db.Users.AddRange(TestMockUsers.MockUsers);
db.SaveChanges();
}
+ })
+ .ConfigureTestServices(services =>
+ {
+ services.AddSingleton<IClock, TestClock>();
});
});
}