Skip to content

Commit 3d8d497

Browse files
committed
Added forgotten test.
1 parent 9e6d84b commit 3d8d497

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldReturnContentTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using NUnit.Framework;
2+
using System.Web.Mvc;
23
using System.Text;
34
using TestStack.FluentMVCTesting.Tests.TestControllers;
45

@@ -80,5 +81,16 @@ public void Emit_readable_error_message_when_the_actual_content_encoding_has_not
8081

8182
Assert.That(exception.Message, Is.EqualTo(string.Format("Expected encoding to be equal to {0}, but instead was null.", ControllerResultTestController.TextualContentEncoding.EncodingName)));
8283
}
84+
85+
[Test]
86+
public void Return_the_content_result()
87+
{
88+
ContentResult expected = (ContentResult)_controller.Content();
89+
ContentResult actual = _controller.WithCallTo(c => c.Content())
90+
.ShouldReturnContent(ControllerResultTestController.TextualContent);
91+
Assert.AreEqual(expected.Content, actual.Content);
92+
Assert.AreEqual(expected.ContentType, actual.ContentType);
93+
Assert.AreEqual(expected.ContentEncoding, actual.ContentEncoding);
94+
}
8395
}
8496
}

0 commit comments

Comments
 (0)