diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-02-28 12:50:57 -0800 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-02-28 12:50:57 -0800 |
commit | a2670ee06b05c1abf31c11972319c6a59ef6940a (patch) | |
tree | 618c159bac47314bd0861ac79538ae44a365a869 /spec/features/projects/issues/rss_spec.rb | |
parent | 05c8ec6cb85a3943b53cbd5757e7baea300dac68 (diff) | |
download | gitlab-ce-a2670ee06b05c1abf31c11972319c6a59ef6940a.tar.gz |
Show public RSS feeds to anonymous users
Diffstat (limited to 'spec/features/projects/issues/rss_spec.rb')
-rw-r--r-- | spec/features/projects/issues/rss_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/features/projects/issues/rss_spec.rb b/spec/features/projects/issues/rss_spec.rb new file mode 100644 index 00000000000..71429f00095 --- /dev/null +++ b/spec/features/projects/issues/rss_spec.rb @@ -0,0 +1,31 @@ +require 'spec_helper' + +feature 'Project Issues RSS' do + let(:project) { create(:empty_project, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } + let(:path) { namespace_project_issues_path(project.namespace, project) } + + before do + create(:issue, project: project) + end + + context 'when signed in' do + before do + user = create(:user) + project.team << [user, :developer] + login_as(user) + visit path + end + + it_behaves_like "it has an RSS button with current_user's private token" + it_behaves_like "an autodiscoverable RSS feed with current_user's private token" + end + + context 'when signed out' do + before do + visit path + end + + it_behaves_like "it has an RSS button without a private token" + it_behaves_like "an autodiscoverable RSS feed without a private token" + end +end |