Added: Add Release Status to Metadata Profile, Default to Official Only (#250)

* Added: Add Release Status to Metadata Profile, Default to Official Only

* Fixed: Unit Test and Comparison
This commit is contained in:
Qstick
2018-03-21 20:43:10 -04:00
committed by GitHub
parent 9d7c6bc961
commit df4e1e9b26
18 changed files with 632 additions and 19 deletions
@@ -27,16 +27,22 @@ namespace NzbDrone.Core.Test.Profiles.Metadata
Allowed = l == SecondaryAlbumType.Studio
}).ToList(),
ReleaseStatuses = ReleaseStatus.All.OrderByDescending(l => l.Name).Select(l => new ProfileReleaseStatusItem
{
ReleaseStatus = l,
Allowed = l == ReleaseStatus.Official
}).ToList(),
Name = "TestProfile"
};
Subject.Insert(profile);
StoredModel.Name.Should().Be(profile.Name);
StoredModel.PrimaryAlbumTypes.Should().Equal(profile.PrimaryAlbumTypes, (a, b) => a.PrimaryAlbumType == b.PrimaryAlbumType && a.Allowed == b.Allowed);
StoredModel.SecondaryAlbumTypes.Should().Equal(profile.SecondaryAlbumTypes, (a, b) => a.SecondaryAlbumType == b.SecondaryAlbumType && a.Allowed == b.Allowed);
StoredModel.ReleaseStatuses.Should().Equal(profile.ReleaseStatuses, (a, b) => a.ReleaseStatus == b.ReleaseStatus && a.Allowed == b.Allowed);
}
}
}