Skip to content

Instantly share code, notes, and snippets.

@jagregory
Created January 4, 2011 21:15
Show Gist options
  • Save jagregory/765425 to your computer and use it in GitHub Desktop.
Save jagregory/765425 to your computer and use it in GitHub Desktop.
var result = Controller.Create(...);
result.ShouldBeRedirectTo("Customers", "Index");
// instead of:
var result = Controller.Create(...);
var redirectResult = result as RedirectResult;
Assert.IsNotNull(redirectResult);
Assert.AreEqual("Customers", redirectResult.Controller);
Assert.AreEqual("Index", redirectResult.Action);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment