diff options
Diffstat (limited to 'spec/frontend/static_site_editor/services/generate_branch_name_spec.js')
-rw-r--r-- | spec/frontend/static_site_editor/services/generate_branch_name_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/frontend/static_site_editor/services/generate_branch_name_spec.js b/spec/frontend/static_site_editor/services/generate_branch_name_spec.js index 0624fc3b7b4..7e437506a16 100644 --- a/spec/frontend/static_site_editor/services/generate_branch_name_spec.js +++ b/spec/frontend/static_site_editor/services/generate_branch_name_spec.js @@ -1,7 +1,7 @@ -import { DEFAULT_TARGET_BRANCH, BRANCH_SUFFIX_COUNT } from '~/static_site_editor/constants'; +import { BRANCH_SUFFIX_COUNT } from '~/static_site_editor/constants'; import generateBranchName from '~/static_site_editor/services/generate_branch_name'; -import { username } from '../mock_data'; +import { username, branch as targetBranch } from '../mock_data'; describe('generateBranchName', () => { const timestamp = 12345678901234; @@ -11,11 +11,11 @@ describe('generateBranchName', () => { }); it('generates a name that includes the username and target branch', () => { - expect(generateBranchName(username)).toMatch(`${username}-${DEFAULT_TARGET_BRANCH}`); + expect(generateBranchName(username, targetBranch)).toMatch(`${username}-${targetBranch}`); }); it(`adds the first ${BRANCH_SUFFIX_COUNT} numbers of the current timestamp`, () => { - expect(generateBranchName(username)).toMatch( + expect(generateBranchName(username, targetBranch)).toMatch( timestamp.toString().substring(BRANCH_SUFFIX_COUNT), ); }); |