diff --git a/app/javascript/sidebar-widget/__tests__/__snapshots__/sidebarUser.test.jsx.snap b/app/javascript/sidebar-widget/__tests__/__snapshots__/sidebarUser.test.jsx.snap
new file mode 100644
index 000000000..3428e2202
--- /dev/null
+++ b/app/javascript/sidebar-widget/__tests__/__snapshots__/sidebarUser.test.jsx.snap
@@ -0,0 +1,28 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[` renders properly 1`] = `
+
+`;
diff --git a/app/javascript/sidebar-widget/__tests__/sidebarUser.test.jsx b/app/javascript/sidebar-widget/__tests__/sidebarUser.test.jsx
new file mode 100644
index 000000000..fab804ee2
--- /dev/null
+++ b/app/javascript/sidebar-widget/__tests__/sidebarUser.test.jsx
@@ -0,0 +1,52 @@
+import { h } from 'preact';
+import { shallow } from 'preact-render-spy';
+import render from 'preact-render-to-json';
+import SidebarUser from '../sidebarUser';
+
+const user = {
+ id: 1234
+}
+const followUser = jest.fn();
+
+const renderedSideBar = props => shallow(
+
+)
+
+describe('', () => {
+ it('renders properly', () => {
+ const tree = render(
+ );
+ expect(tree).toMatchSnapshot();
+ });
+
+ it('triggers the onClick', () => {
+ renderedSideBar().find('.widget-list-item__follow-button').simulate('click');
+ expect(followUser).toHaveBeenCalled();
+ });
+
+ it('shows if the user is followed or not', () => {
+ expect(renderedSideBar({ user: { following: true } }).contains('✓ FOLLOWING')).toBe(true);
+ expect(renderedSideBar({ user: { following: false } }).contains('+ FOLLOW')).toBe(true);
+ });
+
+ it('shows a
if the index equals 2', () => {
+ expect(renderedSideBar({ index: 2 }).find(
).length > 0).toBe(true);
+ expect(renderedSideBar({ index: 2 }).find(
).length > 0).toBe(false);
+ });
+
+ it('shows a
if the index differs from 2', () => {
+ expect(renderedSideBar({ index: 1 }).find(
).length > 0).toBe(true);
+ expect(renderedSideBar({ index: 3 }).find(
).length > 0).toBe(false);
+ });
+});