{"size": 1066, "ext": "js", "max_stars_repo_path": "src/__tests__/actions/index.test.js", "max_stars_repo_name": "dzhambov/Frigo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/__tests__/actions/index.test.js", "max_issues_repo_name": "dzhambov/Frigo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/__tests__/actions/index.test.js", "max_forks_repo_name": "dzhambov/Frigo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.3333333333, "max_line_length": 74, "alphanum_fraction": 0.6322701689}
import * as actions from './../../actions';
import * as c from './../../actions/ActionTypes';

describe('help product actions', () => {
  it('deleteProduct should create DELETE_PRODUCT action', () => {
    expect(actions.deleteProduct(1)).toEqual({
      type: c.DELETE_PRODUCT,
      id: 1
    });
  });

  it('toggleForm should create TOGGLE_FORM action', () => {
    expect(actions.toggleForm()).toEqual({
      type: c.TOGGLE_FORM
    });
  });

  it('requestRecipes should create REQUEST_RECIPES action', () => {
    expect(actions.requestRecipes()).toEqual({
      type: c.REQUEST_RECIPES
    });
  });

  it('getRecipesSuccess should create GET_RECIPES_SUCCESS action', () => {
    const recipes = "Chicken Soup";
    expect(actions.getRecipesSuccess(recipes)).toEqual({
      type: c.GET_RECIPES_SUCCESS,
      recipes
    });
  });

  it('getRecipesFailure should create GET_RECIPES_FAILURE action', () => {
    const error = "An error";
    expect(actions.getRecipesFailure(error)).toEqual({
      type: c.GET_RECIPES_FAILURE,
      error
    });
  });
});