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

legacy_path_redirect_shared_examples.rb « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f300bdd48b1c5393c7e3418a501b1912e12fae5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
shared_examples 'redirecting a legacy path' do |source, target|
  include RSpec::Rails::RequestExampleGroup

  it "redirects #{source} to #{target} when the resource does not exist" do
    expect(get(source)).to redirect_to(target)
  end

  it "does not redirect #{source} to #{target} when the resource exists" do
    resource

    expect(get(source)).not_to redirect_to(target)
  end
end