/*!
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */


import React from 'react';
import TestUtils from 'react-addons-test-utils';

import SubmitErrorResponse from 'nfvo-components/SubmitErrorResponse.jsx';
import {SubmitErrorMessageFactory} from 'test-utils/factories/SubnitErrorMessageFactorie.js';

describe('SubmitErrorResponse test: ', function () {
	it('basic render test', () => {
		let props = {
			validationResponse: SubmitErrorMessageFactory.build()
		};

		let view = TestUtils.renderIntoDocument(<SubmitErrorResponse {...props} />);
		expect(view).toBeTruthy();
	});
});
