BigW Consortium Gitlab

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

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

  context 'when signed in' do
    before do
      project.team << [user, :developer]
11
      sign_in(user)
12 13 14
      visit path
    end

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

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

23
    it_behaves_like "an autodiscoverable RSS feed without an RSS token"
24 25
  end
end