import { createElement as h, render } from '../../src/index';
import { setupScratch, teardown } from '../_util/helpers';

/** @jsx h */

describe('Select', () => {
	let scratch;

	beforeEach(() => {
		scratch = setupScratch();
	});

	afterEach(() => {
		teardown(scratch);
	});

	it('should set <select> value', () => {
		function App() {
			return (
				<select value="B">
					<option value="A">A</option>
					<option value="B">B</option>
					<option value="C">C</option>
				</select>
			);
		}

		render(<App />, scratch);
		expect(scratch.firstChild.value).to.equal('B');
	});
});

@@ -494,16 +494,658 @@
 );%0A%09%09%7D%0A%0A
+%09%09render(%3CApp /%3E, scratch);%0A%09%09expect(scratch.firstChild.value).to.equal('B');%0A%09%7D);%0A%0A%09it('should set value with selected', () =%3E %7B%0A%09%09function App() %7B%0A%09%09%09return (%0A%09%09%09%09%3Cselect%3E%0A%09%09%09%09%09%3Coption value=%22A%22%3EA%3C/option%3E%0A%09%09%09%09%09%3Coption selected value=%22B%22%3EB%3C/option%3E%0A%09%09%09%09%09%3Coption value=%22C%22%3EC%3C/option%3E%0A%09%09%09%09%3C/select%3E%0A%09%09%09);%0A%09%09%7D%0A%0A%09%09render(%3CApp /%3E, scratch);%0A%09%09expect(scratch.firstChild.value).to.equal('B');%0A%09%7D);%0A%0A%09it('should work with multiple selected', () =%3E %7B%0A%09%09function App() %7B%0A%09%09%09return (%0A%09%09%09%09%3Cselect multiple%3E%0A%09%09%09%09%09%3Coption value=%22A%22%3EA%3C/option%3E%0A%09%09%09%09%09%3Coption selected value=%22B%22%3EB%3C/option%3E%0A%09%09%09%09%09%3Coption selected value=%22C%22%3EC%3C/option%3E%0A%09%09%09%09%3C/select%3E%0A%09%09%09);%0A%09%09%7D%0A%0A
 %09%09render

add test testing with multiple and selected attributes