Commit b7a33ed7 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '3051-atom-feed-should-be-scoped-to-repo-path' into 'master'

fix: Atom feed for commit list should point to path

See merge request gitlab-org/gitlab!65599
parents 498f1f49 ef0a744c
......@@ -26,7 +26,7 @@
= form_tag(project_commits_path(@project, @id), method: :get, class: 'commits-search-form js-signature-container', data: { 'signatures-path' => namespace_project_signatures_path }) do
= search_field_tag :search, params[:search], { placeholder: _('Search by message'), id: 'commits-search', class: 'form-control gl-form-input input-short gl-mt-3 gl-sm-mt-0 gl-min-w-full', spellcheck: false }
.control.d-none.d-md-block
= link_to project_commits_path(@project, @ref, rss_url_options), title: _("Commits feed"), class: 'btn gl-button btn-default btn-icon' do
= link_to project_commits_path(@project, @id, rss_url_options), title: _("Commits feed"), class: 'btn gl-button btn-default btn-icon' do
= sprite_icon('rss', css_class: 'qa-rss-icon')
= render_if_exists 'projects/commits/mirror_status'
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'projects/commits/show.html.haml' do
let(:project) { create(:project, :repository) }
let(:commits) { [project.commit] }
let(:path) { 'path/to/doc.md' }
before do
assign(:project, project)
assign(:id, path)
assign(:repository, project.repository)
assign(:commits, commits)
assign(:hidden_commit_count, 0)
controller.params[:controller] = 'projects/commits'
controller.params[:action] = 'show'
controller.params[:namespace_id] = project.namespace.to_param
controller.params[:project_id] = project.to_param
allow(view).to receive(:current_user).and_return(nil)
allow(view).to receive(:namespace_project_signatures_path).and_return("/")
end
context 'tree controls' do
before do
render
end
it 'renders atom feed button with matching path' do
expect(rendered).to have_link(href: "#{project_commits_path(project, path)}?format=atom")
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