Commit 9c400c57 authored by Jacques Erasmus's avatar Jacques Erasmus

Update master to main

Updated the default branch name
parent 0927b183
......@@ -9,7 +9,7 @@ import waitForPromises from 'helpers/wait_for_promises';
const TEST_DEFAULT_BRANCH = { name: 'Any branch' };
const TEST_PROJECT_ID = '1';
const TEST_PROTECTED_BRANCHES = [
{ id: 1, name: 'master' },
{ id: 1, name: 'main' },
{ id: 2, name: 'development' },
];
const TEST_BRANCHES_SELECTIONS = [TEST_DEFAULT_BRANCH, ...TEST_PROTECTED_BRANCHES];
......@@ -61,7 +61,7 @@ describe('Branches Select', () => {
protectedBranches: [
{
id: 1,
name: 'master',
name: 'main',
},
],
},
......@@ -70,10 +70,10 @@ describe('Branches Select', () => {
);
await waitForPromises();
expect(findDropdown().props('text')).toBe('master');
expect(findDropdown().props('text')).toBe('main');
expect(
findDropdownItems()
.filter((item) => item.text() === 'master')
.filter((item) => item.text() === 'main')
.at(0)
.props('isChecked'),
).toBe(true);
......@@ -108,7 +108,7 @@ describe('Branches Select', () => {
});
it('fetches protected branches with no any branch if there is a search', async () => {
findSearch().vm.$emit('input', 'master');
findSearch().vm.$emit('input', 'main');
await waitForPromises();
expect(findDropdownItems()).toHaveLength(protectedBranchNames().length);
......
......@@ -50,7 +50,7 @@ describe('EE Approvals MRRules', () => {
store.modules.approvals.state = {
hasLoaded: true,
rules: [],
targetBranch: 'master',
targetBranch: 'main',
};
store.modules.approvals.actions.putRule = jest.fn();
});
......@@ -64,7 +64,7 @@ describe('EE Approvals MRRules', () => {
});
describe('when editing a MR', () => {
const initialTargetBranch = 'master';
const initialTargetBranch = 'main';
let targetBranchInputElement;
beforeEach(() => {
......@@ -96,7 +96,7 @@ describe('EE Approvals MRRules', () => {
it('re-fetches rules when target branch has changed', () => {
factory();
store.modules.approvals.state.targetBranch = 'master123';
store.modules.approvals.state.targetBranch = 'main123';
return wrapper.vm.$nextTick().then(() => {
expect(store.modules.approvals.actions.fetchRules).toHaveBeenCalled();
......
......@@ -32,7 +32,7 @@ describe('Rule Branches', () => {
protectedBranches: [
{
id: 1,
name: 'master',
name: 'main',
},
{
id: 2,
......@@ -45,7 +45,7 @@ describe('Rule Branches', () => {
rule,
});
expect(wrapper.text()).toContain('master');
expect(wrapper.text()).toContain('main');
expect(wrapper.text()).not.toContain('hello');
});
});
......@@ -7,9 +7,9 @@ describe('Approval MR edit module actions', () => {
it('commits SET_TARGET_BRANCH', (done) => {
testAction(
actions.setTargetBranch,
'master',
'main',
{},
[{ type: types.SET_TARGET_BRANCH, payload: 'master' }],
[{ type: types.SET_TARGET_BRANCH, payload: 'main' }],
[],
done,
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment