debian-mirror-gitlab/spec/lib/gitlab/default_branch_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
621 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# 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