From 6e7b912ec61a6a791e0e8405ff6f6bd7e622a187 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 6 Jun 2017 17:24:08 -0400
Subject: PLT-4257 Add pop-up asking if user wants to reset status (#6526)

* Add pop-up asking if user wants to reset status

* Update test snapshot

* Update prop name for old uses of confirm modal

* Updating checkbox (#6586)

* Updating style for checkbox (#6596)
---
 .../tests/components/reset_status_modal.test.jsx   | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 webapp/tests/components/reset_status_modal.test.jsx

(limited to 'webapp/tests/components/reset_status_modal.test.jsx')

diff --git a/webapp/tests/components/reset_status_modal.test.jsx b/webapp/tests/components/reset_status_modal.test.jsx
new file mode 100644
index 000000000..420bb2bfe
--- /dev/null
+++ b/webapp/tests/components/reset_status_modal.test.jsx
@@ -0,0 +1,29 @@
+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import React from 'react';
+import {shallow} from 'enzyme';
+
+import ResetStatusModal from 'components/reset_status_modal/reset_status_modal.jsx';
+
+describe('components/ResetStatusModal', () => {
+    test('should match snapshot', () => {
+        function emptyFunction() {} //eslint-disable-line no-empty-function
+
+        async function fakeAutoReset() { //eslint-disable-line require-await
+            return {status: 'away', manual: true, user_id: 'fake'};
+        }
+
+        const wrapper = shallow(
+            <ResetStatusModal
+                autoResetPref=''
+                actions={{
+                    autoResetStatus: fakeAutoReset,
+                    setStatus: emptyFunction,
+                    savePreferences: emptyFunction
+                }}
+            />
+        );
+        expect(wrapper).toMatchSnapshot();
+    });
+});
-- 
cgit v1.2.3-1-g7c22

