Continue with Facebook Funtionalit

This commit is contained in:
Belen Curcio
2016-11-11 20:18:22 -03:00
parent c72e504af8
commit 103acd4bce
32 changed files with 247 additions and 88 deletions
@@ -1,31 +0,0 @@
import {Map} from 'immutable';
import {expect} from 'chai';
import authReducer from '../../../../client/coral-framework/store/reducers/auth';
import * as actions from '../../../../client/coral-framework/store/actions/auth';
describe ('authReducer', () => {
describe('SET_LOGGED_IN_USER', () => {
it('should set a logged in user', () => {
const action = {
type: actions.SET_LOGGED_IN_USER,
user_id: '123'
};
const store = new Map({});
const result = authReducer(store, action);
expect(result.get('user')).to.equal(action.user_id);
});
});
describe('LOG_OUT_USER', () => {
it('should clear the user store', () => {
const action = {
type: actions.LOG_OUT_USER
};
const store = new Map({
user: '123'
});
const result = authReducer(store, action);
expect(result.get('user')).to.equal(undefined);
});
});
});
@@ -2,7 +2,7 @@ import 'react';
import 'redux';
import {expect} from 'chai';
import fetchMock from 'fetch-mock';
import * as actions from '../../../../client/coral-framework/store/actions/items';
import * as actions from '../../../../client/coral-framework/actions/items';
import {Map} from 'immutable';
import configureStore from 'redux-mock-store';
@@ -1,6 +1,6 @@
import {Map, fromJS} from 'immutable';
import {expect} from 'chai';
import itemsReducer from '../../../../client/coral-framework/store/reducers/items';
import itemsReducer from '../../../../client/coral-framework/reducers/items';
describe ('itemsReducer', () => {
describe('ADD_ITEM', () => {
@@ -1,7 +1,7 @@
import {Map} from 'immutable';
import {expect} from 'chai';
import notificationReducer from '../../../../client/coral-framework/store/reducers/notification';
import * as actions from '../../../../client/coral-framework/store/actions/notification';
import notificationReducer from '../../../../client/coral-framework/reducers/notification';
import * as actions from '../../../../client/coral-framework/actions/notification';
describe ('notificationsReducer', () => {
describe('ADD_NOTIFICATION', () => {