Exemplo n.º 1
0
      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);
      }
Exemplo n.º 2
0
      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);
      }
Exemplo n.º 3
0
      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);
      }