Skip to content

Commit

Permalink
Remove PluginStoer plugin getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Orlando Hohmeier committed Feb 9, 2016
1 parent 38f0129 commit afa625d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
3 changes: 0 additions & 3 deletions src/js/stores/PluginStore.js
Expand Up @@ -45,9 +45,6 @@ function loadPlugins() {
}

var PluginStore = Object.assign({
getPlugins: function () {
return plugins;
},
getPluginLoadingState: function () {
if (plugins.length === 0) {
return States.STATE_INITIAL;
Expand Down
33 changes: 6 additions & 27 deletions src/test/scenarios/loadPlugins.test.js
Expand Up @@ -68,15 +68,8 @@ describe("load plugins", function () {
it("updates plugin data on request plugins success", function (done) {
PluginStore.once(PluginEvents.CHANGE, function () {
expectAsync(() => {
expect(PluginStore.getPlugins()).to.deep.equal([
{
id: "plugin-id",
modules: ["ui"],
name: "Plugin Name",
description: "Plugin description.",
state: States.STATE_INITIAL
}
]);
expect(PluginStore.getPluginLoadingState())
.to.equal(States.STATE_INITIAL);
}, done);
});

Expand All @@ -89,15 +82,8 @@ describe("load plugins", function () {
PluginEvents.LOAD_PLUGIN_SUCCESS) {
AppDispatcher.unregister(dispatchToken);
expectAsync(() => {
expect(PluginStore.getPlugins()).to.deep.equal([
{
id: "plugin-id",
modules: ["ui"],
name: "Plugin Name",
description: "Plugin description.",
state: States.STATE_SUCCESS
}
]);
expect(PluginStore.getPluginLoadingState())
.to.equal(States.STATE_SUCCESS);
}, done);
}
});
Expand All @@ -115,15 +101,8 @@ describe("load plugins", function () {
PluginEvents.LOAD_PLUGIN_ERROR) {
AppDispatcher.unregister(dispatchToken);
expectAsync(() => {
expect(PluginStore.getPlugins()).to.deep.equal([
{
id: "plugin-id",
modules: ["ui"],
name: "Plugin Name",
description: "Plugin description.",
state: States.STATE_ERROR
}
]);
expect(PluginStore.getPluginLoadingState())
.to.equal(States.STATE_ERROR);
}, done);
}
});
Expand Down

0 comments on commit afa625d

Please sign in to comment.