diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) | |
download | gitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb b/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb deleted file mode 100644 index ca74f7573f3..00000000000 --- a/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Patch::ActionDispatchJourneyFormatter do - let(:group) { create(:group) } - let(:project) { create(:project, namespace: group) } - let(:pipeline) { create(:ci_empty_pipeline, project: project) } - let(:url) { Gitlab::Routing.url_helpers.project_pipeline_url(project, pipeline) } - let(:expected_path) { "#{project.full_path}/-/pipelines/#{pipeline.id}" } - - context 'custom implementation of #missing_keys' do - before do - expect_any_instance_of(Gitlab::Patch::ActionDispatchJourneyFormatter).to receive(:missing_keys) - end - - it 'generates correct url' do - expect(url).to end_with(expected_path) - end - end - - context 'original implementation of #missing_keys' do - before do - allow_any_instance_of(Gitlab::Patch::ActionDispatchJourneyFormatter).to receive(:missing_keys) do |instance, route, parts| - instance.send(:old_missing_keys, route, parts) # test the old implementation - end - end - - it 'generates correct url' do - expect(url).to end_with(expected_path) - end - end -end |