import reducer from './user'
import { userLoggedIn } from '../actions/user'

it('returns default state', () => {
  expect(reducer(undefined, {})).toEqual({
    isAuthenticated: false,
    isSignOutRunning: false,
    isSignOutComplete: false
  })
})

it('changes flag when user is authenticated', () => {
  expect(reducer({ isAuthenticated: false }, userLoggedIn())).toEqual({
    isAuthenticated: true
  })
})

@@ -43,16 +43,26 @@
 LoggedIn
+, demoUser
  %7D from 
@@ -79,16 +79,16 @@
 s/user'%0A
-
 %0Ait('ret
@@ -151,32 +151,51 @@
  %7B%7D)).toEqual(%7B%0A
+    isDemo: false,%0A
     isAuthentica
@@ -395,24 +395,24 @@
 ).toEqual(%7B%0A
-
     isAuthen
@@ -425,16 +425,146 @@
 d: true%0A  %7D)%0A%7D)%0A
+%0Ait('changes flag when user is demo', () =%3E %7B%0A  expect(reducer(%7B isDemo: false %7D, demoUser())).toEqual(%7B%0A    isDemo: true%0A  %7D)%0A%7D)%0A

Fix test