| Index: pkg/shelf/test/response_test.dart
|
| diff --git a/pkg/shelf/test/response_test.dart b/pkg/shelf/test/response_test.dart
|
| index 3006d703adc41a1cf87c7972054c5d09a0db4092..af0e4562bffb498db30bb52aeb6f4c0b40228d34 100644
|
| --- a/pkg/shelf/test/response_test.dart
|
| +++ b/pkg/shelf/test/response_test.dart
|
| @@ -231,4 +231,56 @@ void main() {
|
| }).contentLength, equals(42));
|
| });
|
| });
|
| +
|
| +
|
| + group("context", () {
|
| + test("are correctly populated in ok", () {
|
| + expect(new Response.ok("okay!", headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in forbidden", () {
|
| + expect(new Response.forbidden("okay!", headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in found", () {
|
| + expect(new Response.found("okay!", headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in internalServerError", () {
|
| + expect(new Response.internalServerError(headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in movedPermanently", () {
|
| + expect(new Response.movedPermanently("okay!", headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in notFound", () {
|
| + expect(new Response.notFound("okay!", headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in notModified", () {
|
| + expect(new Response.notModified(headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +
|
| + test("are correctly populated in seeOther", () {
|
| + expect(new Response.seeOther("other", headers: {}, context: {
|
| + 'my-param' : 42
|
| + }).context['my-param'], equals(42));
|
| + });
|
| +});
|
| +
|
| }
|
|
|