Shakeout Testing Part 1 (#1052)

* Have language from epubs populate metadata

* series detail needs to reload the underlying volumes when scan event comes in, not just metadata.

* Added Id to chapter detail modal (for debugging)

* Implement IDisposable on applicable Unit Tests

* Removed unused using statements

* Fixed a bug where images would flash like crazy during a scan because the code to refresh the underlying image wasn't checking the entity type or Id.

* When filtering rating, only apply the filter to your account.

* Removed Disposable on tests
This commit is contained in:
Joseph Milazzo 2022-02-09 16:59:14 -08:00 committed by GitHub
parent 1f8f6f6fac
commit 2b0d47d15e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 102 additions and 49 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.IO;
using System.IO.Abstractions.TestingHelpers;
@ -10,15 +11,11 @@ using API.DTOs.Reader;
using API.Entities;
using API.Entities.Enums;
using API.Services;
using API.Services.Tasks;
using API.SignalR;
using AutoMapper;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.Logging;
using NetVips;
using NSubstitute;
using Xunit;
@ -26,10 +23,7 @@ namespace API.Tests.Services;
public class BookmarkServiceTests
{
private readonly ILogger<CleanupService> _logger = Substitute.For<ILogger<CleanupService>>();
private readonly IUnitOfWork _unitOfWork;
private readonly IHubContext<MessageHub> _messageHub = Substitute.For<IHubContext<MessageHub>>();
private readonly DbConnection _connection;
private readonly DataContext _context;
@ -63,8 +57,6 @@ public class BookmarkServiceTests
return connection;
}
public void Dispose() => _connection.Dispose();
private async Task<bool> SeedDb()
{
await _context.Database.MigrateAsync();