File: ambiguous_ref_controller_shared_context.rb

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (14 lines) | stat: -rw-r--r-- 591 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

RSpec.shared_context 'with ambiguous refs for controllers' do
  before do
    expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original # rubocop:disable RSpec/ExpectInHook
    project.repository.add_tag(project.creator, 'ambiguous_ref', RepoHelpers.sample_commit.id)
    project.repository.add_branch(project.creator, 'ambiguous_ref', RepoHelpers.another_sample_commit.id)
  end

  after do
    project.repository.rm_tag(project.creator, 'ambiguous_ref')
    project.repository.rm_branch(project.creator, 'ambiguous_ref')
  end
end