public void Redirect_For_Guest_Is_TestURL() { UploadController upload = new UploadController(); RedirectResult result = upload.Upload("title", "description", Principals.Guest, new TestUploadedFile()) as RedirectResult; Assert.AreEqual("/TestURL", result.Url); }
public void Returns_Redirect_For_Collector() { UploadController upload = new UploadController(); ActionResult result = upload.Upload("title", "description", Principals.Collector, new TestUploadedFile()); Assert.IsInstanceOfType(typeof(RedirectToRouteResult), result); }
public void Does_Redirect_For_Guest() { UploadController upload = new UploadController(); ActionResult result = upload.Upload("title", "description", Principals.Guest, new TestUploadedFile()); Assert.IsInstanceOfType(typeof(RedirectResult), result); }