summaryrefslogtreecommitdiff
path: root/spec/frontend/clusters/services/application_state_machine_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/clusters/services/application_state_machine_spec.js')
-rw-r--r--spec/frontend/clusters/services/application_state_machine_spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/clusters/services/application_state_machine_spec.js b/spec/frontend/clusters/services/application_state_machine_spec.js
index 8632c5c4e26..b27cd2c80fd 100644
--- a/spec/frontend/clusters/services/application_state_machine_spec.js
+++ b/spec/frontend/clusters/services/application_state_machine_spec.js
@@ -161,4 +161,20 @@ describe('applicationStateMachine', () => {
});
});
});
+
+ describe('current state is undefined', () => {
+ it('returns the current state without having any effects', () => {
+ const currentAppState = {};
+ expect(transitionApplicationState(currentAppState, INSTALLABLE)).toEqual(currentAppState);
+ });
+ });
+
+ describe('with event is undefined', () => {
+ it('returns the current state without having any effects', () => {
+ const currentAppState = {
+ status: NO_STATUS,
+ };
+ expect(transitionApplicationState(currentAppState, undefined)).toEqual(currentAppState);
+ });
+ });
});