Fixed unit tests

pull/3338/head
tidusjar 5 years ago
parent 4bf66ef031
commit 585bd0aab1

@ -4,16 +4,19 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger: trigger:
- master branches:
- feature/v4 include:
- develop - feature/*
exclude:
- develop
- master
variables: variables:
solution: '**/*.sln' solution: '**/*.sln'
testProj: '**/*.Tests.csproj' testProj: '**/*.Tests.csproj'
csProj: '**/*.csproj' csProj: '**/*.csproj'
buildConfiguration: 'Release' buildConfiguration: 'Release'
publishLocation: '$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp2.2' publishLocation: '$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp3.0'
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
@ -27,7 +30,7 @@ steps:
- task: CmdLine@2 - task: CmdLine@2
inputs: inputs:
script: | script: |
cd src/Ombi/bin/Release/netcoreapp2.2 cd src/Ombi/bin/Release/netcoreapp3.0
ls ls
workingDirectory: '$(Build.SourcesDirectory)' workingDirectory: '$(Build.SourcesDirectory)'

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Security.Principal; using System.Security.Principal;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Linq; using System.Linq;
using System.Threading;
using AutoFixture; using AutoFixture;
using Hqub.MusicBrainz.API.Entities; using Hqub.MusicBrainz.API.Entities;
using Moq; using Moq;
@ -172,7 +173,7 @@ namespace Ombi.Core.Tests.Engine.V2
ApiKey = "dasdsa", ApiKey = "dasdsa",
Ip = "192.168.1.7" Ip = "192.168.1.7"
}); });
_lidarrApi.Setup(x => x.GetArtistByForeignId(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())) _lidarrApi.Setup(x => x.GetArtistByForeignId(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), CancellationToken.None))
.ReturnsAsync(new ArtistResult .ReturnsAsync(new ArtistResult
{ {
images = new Image[] images = new Image[]

Loading…
Cancel
Save