|
@@ -1,7 +1,7 @@ |
|
|
import React from "react" |
|
|
import React from "react" |
|
|
import expect from "expect" |
|
|
import expect from "expect" |
|
|
import { shallow } from "enzyme" |
|
|
import { shallow } from "enzyme" |
|
|
import { fromJS } from "immutable" |
|
|
|
|
|
|
|
|
import { fromJS, List } from "immutable" |
|
|
import Response from "components/response" |
|
|
import Response from "components/response" |
|
|
import ModelExample from "components/model-example" |
|
|
import ModelExample from "components/model-example" |
|
|
import { inferSchema } from "corePlugins/samples/fn" |
|
|
import { inferSchema } from "corePlugins/samples/fn" |
|
@@ -28,7 +28,9 @@ describe("<Response />", function() { |
|
|
}, |
|
|
}, |
|
|
contentType: "application/json", |
|
|
contentType: "application/json", |
|
|
className: "for-test", |
|
|
className: "for-test", |
|
|
|
|
|
specPath: List(), |
|
|
response: fromJS({ |
|
|
response: fromJS({ |
|
|
|
|
|
schema: { |
|
|
type: "object", |
|
|
type: "object", |
|
|
properties: { |
|
|
properties: { |
|
|
// Note reverse order: c, b, a |
|
|
// Note reverse order: c, b, a |
|
@@ -42,6 +44,7 @@ describe("<Response />", function() { |
|
|
type: "string" |
|
|
type: "string" |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}), |
|
|
}), |
|
|
code: "200" |
|
|
code: "200" |
|
|
} |
|
|
} |
|
@@ -55,4 +58,4 @@ describe("<Response />", function() { |
|
|
const modelExampleSchemaProperties = renderedModelExample.props().schema.toJS().properties |
|
|
const modelExampleSchemaProperties = renderedModelExample.props().schema.toJS().properties |
|
|
expect( Object.keys(modelExampleSchemaProperties) ).toEqual(["c", "b", "a"]) |
|
|
expect( Object.keys(modelExampleSchemaProperties) ).toEqual(["c", "b", "a"]) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}) |