rss_spec.rb 747 Bytes
Newer Older
1 2 3
require 'spec_helper'

feature 'Project Commits RSS' do
4
  let(:user) { create(:user) }
5
  let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
6
  let(:path) { project_commits_path(project, :master) }
7 8 9

  context 'when signed in' do
    before do
10
      project.add_developer(user)
11
      sign_in(user)
12 13 14
      visit path
    end

15 16
    it_behaves_like "it has an RSS button with current_user's RSS token"
    it_behaves_like "an autodiscoverable RSS feed with current_user's RSS token"
17 18 19 20 21 22 23
  end

  context 'when signed out' do
    before do
      visit path
    end

24 25
    it_behaves_like "it has an RSS button without an RSS token"
    it_behaves_like "an autodiscoverable RSS feed without an RSS token"
26 27
  end
end