mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Fixed: Parse series for search results
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
@@ -54,6 +55,17 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
|
||||
details.Item2.Title.Should().Be(name);
|
||||
}
|
||||
|
||||
[TestCase("54837483", "The Book of Dust", "1")]
|
||||
[TestCase("28360360", "October Daye", "9.3")]
|
||||
public void should_parse_series_from_title(string id, string series, string position)
|
||||
{
|
||||
var result = Subject.GetBookInfo(id);
|
||||
|
||||
var link = result.Item2.SeriesLinks.Value.First();
|
||||
link.Series.Value.Title.Should().Be(series);
|
||||
link.Position.Should().Be(position);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void getting_details_of_invalid_author()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
@@ -104,5 +105,16 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
|
||||
cast.Title.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
|
||||
[TestCase("B01N390U59", "The Book of Dust", "1")]
|
||||
[TestCase("B0191WS1EE", "October Daye", "9.3")]
|
||||
public void should_parse_series_from_title(string query, string series, string position)
|
||||
{
|
||||
var result = Subject.SearchByField("field", query);
|
||||
|
||||
var link = result.First().SeriesLinks.Value.First();
|
||||
link.Series.Value.Title.Should().Be(series);
|
||||
link.Position.Should().Be(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user