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-09-02 21:10:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-02 21:10:40 +0300
commit4e06ca9e7d67aee59d691a363dabba46d53d34ba (patch)
tree350af7ee7d4b8d0d22b4f251141f486fa8ae181a /spec/frontend/boards/stores/getters_spec.js
parent8e3523281051490ff696bfd85bea1195c046c87c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/stores/getters_spec.js')
-rw-r--r--spec/frontend/boards/stores/getters_spec.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/frontend/boards/stores/getters_spec.js b/spec/frontend/boards/stores/getters_spec.js
index 1e09ad6c7c7..267451845ba 100644
--- a/spec/frontend/boards/stores/getters_spec.js
+++ b/spec/frontend/boards/stores/getters_spec.js
@@ -91,4 +91,28 @@ describe('Boards - Getters', () => {
});
});
});
+
+ describe('getIssueById', () => {
+ const state = { issues: { '1': 'issue' } };
+
+ it.each`
+ id | expected
+ ${'1'} | ${'issue'}
+ ${''} | ${{}}
+ `('returns $expected when $id is passed to state', ({ id, expected }) => {
+ expect(getters.getIssueById(state)(id)).toEqual(expected);
+ });
+ });
+
+ describe('getActiveIssue', () => {
+ it.each`
+ id | expected
+ ${'1'} | ${'issue'}
+ ${''} | ${{}}
+ `('returns $expected when $id is passed to state', ({ id, expected }) => {
+ const state = { issues: { '1': 'issue' }, activeId: id };
+
+ expect(getters.getActiveIssue(state)).toEqual(expected);
+ });
+ });
});