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/ci/job_details/store/mutations_spec.js')
-rw-r--r--spec/frontend/ci/job_details/store/mutations_spec.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/spec/frontend/ci/job_details/store/mutations_spec.js b/spec/frontend/ci/job_details/store/mutations_spec.js
index 0835c534fb9..78b29efed68 100644
--- a/spec/frontend/ci/job_details/store/mutations_spec.js
+++ b/spec/frontend/ci/job_details/store/mutations_spec.js
@@ -12,11 +12,17 @@ describe('Jobs Store Mutations', () => {
stateCopy = state();
});
- describe('SET_JOB_ENDPOINT', () => {
+ describe('SET_JOB_LOG_OPTIONS', () => {
it('should set jobEndpoint', () => {
- mutations[types.SET_JOB_ENDPOINT](stateCopy, 'job/21312321.json');
+ mutations[types.SET_JOB_LOG_OPTIONS](stateCopy, {
+ endpoint: '/group1/project1/-/jobs/99.json',
+ pagePath: '/group1/project1/-/jobs/99',
+ });
- expect(stateCopy.jobEndpoint).toEqual('job/21312321.json');
+ expect(stateCopy).toMatchObject({
+ jobLogEndpoint: '/group1/project1/-/jobs/99',
+ jobEndpoint: '/group1/project1/-/jobs/99.json',
+ });
});
});
@@ -39,13 +45,13 @@ describe('Jobs Store Mutations', () => {
describe('RECEIVE_JOB_LOG_SUCCESS', () => {
describe('when job log has state', () => {
it('sets jobLogState', () => {
- const stateLog =
+ const logState =
'eyJvZmZzZXQiOjczNDQ1MSwibl9vcGVuX3RhZ3MiOjAsImZnX2NvbG9yIjpudWxsLCJiZ19jb2xvciI6bnVsbCwic3R5bGVfbWFzayI6MH0=';
mutations[types.RECEIVE_JOB_LOG_SUCCESS](stateCopy, {
- state: stateLog,
+ state: logState,
});
- expect(stateCopy.jobLogState).toEqual(stateLog);
+ expect(stateCopy.jobLogState).toEqual(logState);
});
});
@@ -100,7 +106,7 @@ describe('Jobs Store Mutations', () => {
{
offset: 1,
content: [{ text: 'Running with gitlab-runner 11.12.1 (5a147c92)' }],
- lineNumber: 0,
+ lineNumber: 1,
},
]);
});
@@ -121,7 +127,7 @@ describe('Jobs Store Mutations', () => {
{
offset: 0,
content: [{ text: 'Running with gitlab-runner 11.11.1 (5a147c92)' }],
- lineNumber: 0,
+ lineNumber: 1,
},
]);
});