Esempio n. 1
0
        public void should_reject_unknown_release()
        {
            var result = Releases.Post(new ReleaseResource {
                Guid = "unknown"
            }, HttpStatusCode.NotFound);

            result.Id.Should().Be(0);
        }
Esempio n. 2
0
        public void should_accept_request_with_only_guid_supplied()
        {
            var releases = Releases.All();

            // InternalServerError is caused by the Release being invalid for download (no Series).
            // But if it didn't accept it, it would return NotFound.
            // TODO: Maybe we should create a full mock Newznab server endpoint.
            //var result = Releases.Post(new ReleaseResource { Guid = releases.First().Guid });
            //result.Guid.Should().Be(releases.First().Guid);
            var result = Releases.Post(new ReleaseResource {
                Guid = releases.First().Guid
            }, HttpStatusCode.InternalServerError);
        }