Skip to content

Commit 432091b

Browse files
committed
Fix to assertion message
1 parent a6c98a7 commit 432091b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

TestStack.FluentMVCTesting.Tests/ControllerResultTestTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public void Check_for_redirect_to_action_with_non_specified_controller()
240240
var exception = Assert.Throws<ActionResultAssertionException>(() =>
241241
_controller.WithCallTo(c => c.RedirectToAnotherActionNoController()).ShouldRedirectTo<SomeOtherController>(c => c.SomeOtherAction())
242242
);
243-
Assert.That(exception.Message, Is.EqualTo("Expected redirect to action 'SomeOtherAction' in 'SomeOther' controller, but instead was given redirect to 'SomeAction' within the same controller."));
243+
Assert.That(exception.Message, Is.EqualTo("Expected redirect to action 'SomeOtherAction' in 'SomeOther' controller, but instead was given redirect to action 'SomeAction' within the same controller."));
244244
}
245245
#endregion
246246

TestStack.FluentMvcTesting/ControllerResultTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public RouteValueDictionary ShouldRedirectTo<TController>(MethodInfo methodInfo)
161161
var redirectResult = (RedirectToRouteResult)_actionResult;
162162

163163
if (redirectResult.RouteValues["Controller"] == null)
164-
throw new ActionResultAssertionException(string.Format("Expected redirect to action '{0}' in '{1}' controller, but instead was given redirect to '{2}' within the same controller.", actionName, controllerName, redirectResult.RouteValues["Action"]));
164+
throw new ActionResultAssertionException(string.Format("Expected redirect to action '{0}' in '{1}' controller, but instead was given redirect to action '{2}' within the same controller.", actionName, controllerName, redirectResult.RouteValues["Action"]));
165165

166166
if (redirectResult.RouteValues["Controller"].ToString() != controllerName)
167167
throw new ActionResultAssertionException(string.Format("Expected redirect to controller '{0}', but instead was given a redirect to controller '{1}'.", controllerName, redirectResult.RouteValues["Controller"]));

0 commit comments

Comments
 (0)