Initial git

This commit is contained in:
Qolzam
2017-07-06 11:20:18 +04:30
commit 7c691d8e4d
142 changed files with 13046 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// - Import react components
import configureMockStore from 'redux-mock-store'
import thunk from 'redux-thunk'
var expect = require('expect')
import firebase, {firebaseRef} from 'app/firebase'
var authorizeActions = require('authorizeActions')
import * as types from 'actionTypes'
var createMockStore = configureMockStore([thunk])
describe('AuthorizeActions', () => {
it('should generate login action', () => {
const uid = 'UID123456'
var action = {
type: types.LOGIN,
authed: true,
uid
}
var res = authorizeActions.login(action.uid)
expect(res).toEqual(action);
})
it('should generate logout action', () => {
var action = {
type: types.LOGOUT
}
var res = authorizeActions.logout()
expect(res).toEqual(action)
})
})