Commit d2be5844 authored by Etienne Baqué's avatar Etienne Baqué

Merge branch...

Merge branch '325263-wiki-kerberos-clone-button-fails-with-undefined-local-variable-or-method-project' into 'master'

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

See merge request gitlab-org/gitlab!58270
parents 6efbd36c 4476913a
- 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