Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Fix tests and debug statement
Browse files Browse the repository at this point in the history
Fixes appstore tests by ensuring fetching starts off the correct
way.

Removes debug statement and duplicate case statement.
  • Loading branch information
Marco Segreto committed Jul 11, 2016
1 parent 18f2902 commit 30930bc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion static_src/stores/org_store.js
Expand Up @@ -84,7 +84,6 @@ class OrgStore extends BaseStore {
case orgActionTypes.ORG_TOGGLE_SPACE_MENU: {
this._currentOrgGuid = action.orgGuid;
const updates = this.updateOpenOrgs(action.orgGuid);
console.log('on org toggle space menu, orgs', this.getAll());
this.mergeMany('guid', updates, (changed) => {
if (changed) this.emitChange();
});
Expand Down
6 changes: 0 additions & 6 deletions static_src/stores/space_store.js
Expand Up @@ -50,12 +50,6 @@ class SpaceStore extends BaseStore {
break;
}

case spaceActionTypes.SPACE_CHANGE_CURRENT: {
this._currentSpaceGuid = action.spaceGuid;
this.emitChange();
break;
}

default:
break;
}
Expand Down
2 changes: 2 additions & 0 deletions static_src/test/unit/stores/app_store.spec.js
Expand Up @@ -14,6 +14,7 @@ describe('AppStore', function() {

beforeEach(() => {
AppStore._data = Immutable.List();
AppStore.fetching = false;
sandbox = sinon.sandbox.create();
});

Expand Down Expand Up @@ -80,6 +81,7 @@ describe('AppStore', function() {
it('should emit a change event if data was updated', function() {
var spy = sandbox.spy(AppStore, 'emitChange');

AppStore._fetching = true;
AppDispatcher.handleViewAction({
type: appActionTypes.APP_RECEIVED,
app: { guid: 'asdf' }
Expand Down

0 comments on commit 30930bc

Please sign in to comment.