Welcome to mirror list, hosted at ThFree Co, Russian Federation.

default_branch_spec.rb « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b066815612cd33e056ceff420b4a0f621a19d8c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require 'spec_helper'

# We disabled main_branch_over_master feature for tests
# In order to have consistent branch usages
# When we migrate the branch name to main, we can enable it
RSpec.describe Gitlab::DefaultBranch do
  context 'main_branch_over_master is enabled' do
    before do
      stub_feature_flags(main_branch_over_master: true)
    end

    it 'returns main' do
      expect(described_class.value).to eq('main')
    end
  end

  context 'main_branch_over_master is disabled' do
    it 'returns master' do
      expect(described_class.value).to eq('master')
    end
  end
end