Skip to content

Instantly share code, notes, and snippets.

@Tinusw
Tinusw / cloudSettings
Last active February 10, 2020 15:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-10T15:52:31.833Z","extensionVersion":"v3.4.3"}
{
"workbench.statusBar.visible": true,
"workbench.statusBar.feedback.visible": false,
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 0,
"editor.formatOnSave": true,
"javascript.format.enable": false,
"prettier.eslintIntegration": true,
"editor.scrollBeyondLastLine": false,
"editor.minimap.enabled": false,
// rake routes | grep resource
my_resource_index GET /my_resource(.:format) my_resource#index
POST /my_resource(.:format) my_resource#create
new_my_resource GET /my_resource/new(.:format) my_resource#new
edit_my_resource GET /my_resource/:id/edit(.:format) my_resource#edit
my_resource GET /my_resource/:id(.:format) my_resource#show
PATCH /my_resource/:id(.:format) my_resource#update
PUT /my_resource/:id(.:format) my_resource#update
DELETE /my_resource/:id(.:format) my_resource#destroy
import { combineReducers } from 'redux';
import { reducer as form } from 'redux-form';
import authReducer from './auth_reducer'
const rootReducer = combineReducers({
auth: authReducer
});
export default rootReducer;
export * from './auth_actions'
import { expect } from "../test_helper";
import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk";
import moxios from "moxios";
import { storageMock } from "./mock_local_storage";
import { signinUser } from "../../src/actions/index";
import { AUTH_USER, AUTH_ERROR } from "../../src/actions/types";
import { expect } from "../test_helper";
import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk";
import moxios from "moxios";
import { storageMock } from "./mock_local_storage";
import { signinUser, signoutUser, signUpUser } from "../../src/actions/index";
import { AUTH_USER, AUTH_ERROR, UNAUTH_USER } from "../../src/actions/types";
import { expect } from "../test_helper";
import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk";
import moxios from "moxios";
import { storageMock } from "./mock_local_storage";
import { signinUser, signoutUser, signUpUser, fetchCampaigns } from "../../src/actions/index";
import { AUTH_USER, AUTH_ERROR, UNAUTH_USER, FETCH_CAMPAIGNS } from "../../src/actions/types";
export function storageMock() {
let store = {}
return {
getItem: function(key) {
return store[key] || null
},
setItem: function(key, value) {
store[key] = value.toString()
},
removeItem: function(key) {
export function storageMock() {
var storage = {};
return {
setItem: function(key, value) {
storage[key] = value || "";
},
getItem: function(key) {
return key in storage ? storage[key] : null;
},