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

topic.html.haml_spec.rb « projects « explore « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1d2085b3be6d47595809ced1da20df79b76ab0bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'explore/projects/topic.html.haml', feature_category: :groups_and_projects do
  let(:topic) { build_stubbed(:topic, name: 'test-topic', title: 'Test topic') }
  let(:project) { build_stubbed(:project, :public, topic_list: topic.name) }

  before do
    assign(:topic, topic)
    assign(:projects, [project])

    controller.params[:controller] = 'explore/projects'
    controller.params[:action] = 'topic'

    allow(view).to receive(:current_user).and_return(nil)

    render
  end

  it 'renders atom feed button with matching path' do
    expect(rendered).to have_link(href: topic_explore_projects_path(topic.name, format: 'atom'))
  end
end