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/releases/stores/modules/detail/mutations_spec.js')
-rw-r--r--spec/frontend/releases/stores/modules/detail/mutations_spec.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/spec/frontend/releases/stores/modules/detail/mutations_spec.js b/spec/frontend/releases/stores/modules/detail/mutations_spec.js
index 85844831e0b..60b57c7a7ff 100644
--- a/spec/frontend/releases/stores/modules/detail/mutations_spec.js
+++ b/spec/frontend/releases/stores/modules/detail/mutations_spec.js
@@ -25,11 +25,12 @@ describe('Release edit/new mutations', () => {
mutations[types.INITIALIZE_EMPTY_RELEASE](state);
expect(state.release).toEqual({
- tagName: null,
+ tagName: 'v1.3',
name: '',
description: '',
milestones: [],
groupMilestones: [],
+ releasedAt: new Date(),
assets: {
links: [],
},
@@ -82,6 +83,16 @@ describe('Release edit/new mutations', () => {
});
});
+ describe(`${types.UPDATE_RELEASED_AT}`, () => {
+ it("updates the release's released at date", () => {
+ state.release = release;
+ const newDate = new Date();
+ mutations[types.UPDATE_RELEASED_AT](state, newDate);
+
+ expect(state.release.releasedAt).toBe(newDate);
+ });
+ });
+
describe(`${types.UPDATE_CREATE_FROM}`, () => {
it('updates the ref that the ref will be created from', () => {
state.createFrom = 'main';
@@ -92,6 +103,16 @@ describe('Release edit/new mutations', () => {
});
});
+ describe(`${types.UPDATE_SHOW_CREATE_FROM}`, () => {
+ it('updates the ref that the ref will be created from', () => {
+ state.showCreateFrom = true;
+ const newValue = false;
+ mutations[types.UPDATE_SHOW_CREATE_FROM](state, newValue);
+
+ expect(state.showCreateFrom).toBe(newValue);
+ });
+ });
+
describe(`${types.UPDATE_RELEASE_TITLE}`, () => {
it("updates the release's title", () => {
state.release = release;