Skip to content

Commit dcd8df2

Browse files
committed
Made the file result check return the actual file result so extra assertions can be made on it
1 parent 0a6ff7f commit dcd8df2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

TestStack.FluentMvcTesting/ControllerResultTest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public ViewResultTest ShouldRenderDefaultPartialView()
207207
return ShouldRenderPartialView(_actionName);
208208
}
209209

210-
public void ShouldRenderFile(string contentType = null)
210+
public FileContentResult ShouldRenderFile(string contentType = null)
211211
{
212212
ValidateActionReturnType<FileContentResult>();
213213

@@ -217,6 +217,8 @@ public void ShouldRenderFile(string contentType = null)
217217
{
218218
throw new ActionResultAssertionException(string.Format("Expected file to be of content type '{0}', but instead was given '{1}'.", contentType, fileResult.ContentType));
219219
}
220+
221+
return fileResult;
220222
}
221223

222224
#endregion

0 commit comments

Comments
 (0)