Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 21:38:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 21:38:24 +0300
commit983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch)
treeb153cd387c14ba23bd5a07514c7c01fddf6a78a0 /spec/frontend/jira_import/utils_spec.js
parenta2bddee2cdb38673df0e004d5b32d9f77797de64 (diff)
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/frontend/jira_import/utils_spec.js')
-rw-r--r--spec/frontend/jira_import/utils_spec.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/jira_import/utils_spec.js b/spec/frontend/jira_import/utils_spec.js
new file mode 100644
index 00000000000..a14db104229
--- /dev/null
+++ b/spec/frontend/jira_import/utils_spec.js
@@ -0,0 +1,27 @@
+import { IMPORT_STATE, isInProgress } from '~/jira_import/utils';
+
+describe('isInProgress', () => {
+ it('returns true when state is IMPORT_STATE.SCHEDULED', () => {
+ expect(isInProgress(IMPORT_STATE.SCHEDULED)).toBe(true);
+ });
+
+ it('returns true when state is IMPORT_STATE.STARTED', () => {
+ expect(isInProgress(IMPORT_STATE.STARTED)).toBe(true);
+ });
+
+ it('returns false when state is IMPORT_STATE.FAILED', () => {
+ expect(isInProgress(IMPORT_STATE.FAILED)).toBe(false);
+ });
+
+ it('returns false when state is IMPORT_STATE.FINISHED', () => {
+ expect(isInProgress(IMPORT_STATE.FINISHED)).toBe(false);
+ });
+
+ it('returns false when state is IMPORT_STATE.NONE', () => {
+ expect(isInProgress(IMPORT_STATE.NONE)).toBe(false);
+ });
+
+ it('returns false when state is undefined', () => {
+ expect(isInProgress()).toBe(false);
+ });
+});