Commit 4476913a authored by Athar Hameed's avatar Athar Hameed Committed by Etienne Baqué

Fix 500 error when cloning a wiki using the Kerberos clone button

parent b0f920c2
- if alternative_kerberos_url?
%li
= kerberos_clone_button(project)
= kerberos_clone_button(container)
---
title: Fix 500 error when cloning a wiki using the Kerberos clone button
merge_request: 58270
author:
type: fixed
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'shared/kerberos_clone_button' do
let_it_be(:project) { create(:project) }
let(:partial) { 'shared/kerberos_clone_button' }
before do
allow(view).to receive(:alternative_kerberos_url?).and_return(true)
end
subject { rendered }
context 'Kerberos clone can be triggered' do
it 'renders a working clone button for the project' do
render partial, container: project
is_expected.to have_link('KRB5', href: project.kerberos_url_to_repo)
end
it 'renders a working clone button for the wiki' do
render partial, container: project.wiki
is_expected.to have_link('KRB5', href: project.wiki.kerberos_url_to_repo)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment