diff --git a/src/popper_component.jsx b/src/popper_component.jsx
index cdf7b0223..19e8ac267 100644
--- a/src/popper_component.jsx
+++ b/src/popper_component.jsx
@@ -77,7 +77,6 @@ export default class PopperComponent extends React.Component {
}
return (
-
{({ ref }) => (
@@ -88,7 +87,6 @@ export default class PopperComponent extends React.Component {
{popper}
-
);
}
}
diff --git a/test/datepicker_test.js b/test/datepicker_test.js
index ae2c62f16..1dfe8f0e4 100644
--- a/test/datepicker_test.js
+++ b/test/datepicker_test.js
@@ -83,16 +83,14 @@ describe("DatePicker", () => {
});
it("should pass a custom class to the popper container", () => {
- var datePicker = TestUtils.renderIntoDocument(
-
- );
- var dateInput = datePicker.input;
+ var datePicker = mount();
+ var dateInput = datePicker.instance().input;
TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput));
- const element = ReactDOM.findDOMNode(datePicker);
- const popper = element.querySelector(".react-datepicker-popper");
- expect(popper).to.exist;
- expect(popper.className).to.contain("some-class-name");
+ datePicker.update();
+ const popper = datePicker.find(".react-datepicker-popper");
+ expect(popper.length).to.equal(1);
+ expect(popper.hasClass("some-class-name")).to.equal(true);
});
it("should show the calendar when clicking on the date input", () => {