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:
Diffstat (limited to 'spec/frontend/whats_new/store/actions_spec.js')
-rw-r--r--spec/frontend/whats_new/store/actions_spec.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/frontend/whats_new/store/actions_spec.js b/spec/frontend/whats_new/store/actions_spec.js
index 39ad526cf14..c9614c7330b 100644
--- a/spec/frontend/whats_new/store/actions_spec.js
+++ b/spec/frontend/whats_new/store/actions_spec.js
@@ -44,16 +44,33 @@ describe('whats new actions', () => {
axiosMock.restore();
});
+ it("doesn't require arguments", () => {
+ axiosMock.reset();
+
+ axiosMock
+ .onGet('/-/whats_new', { params: { page: undefined, v: undefined } })
+ .replyOnce(200, [{ title: 'GitLab Stories' }]);
+
+ testAction(
+ actions.fetchItems,
+ {},
+ {},
+ expect.arrayContaining([
+ { type: types.ADD_FEATURES, payload: [{ title: 'GitLab Stories' }] },
+ ]),
+ );
+ });
+
it('passes arguments', () => {
axiosMock.reset();
axiosMock
- .onGet('/-/whats_new', { params: { page: 8 } })
+ .onGet('/-/whats_new', { params: { page: 8, v: 42 } })
.replyOnce(200, [{ title: 'GitLab Stories' }]);
testAction(
actions.fetchItems,
- { page: 8 },
+ { page: 8, versionDigest: 42 },
{},
expect.arrayContaining([
{ type: types.ADD_FEATURES, payload: [{ title: 'GitLab Stories' }] },