summaryrefslogtreecommitdiff
path: root/spec/features/projects/commit
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-02-28 12:50:57 -0800
committerMichael Kozono <mkozono@gmail.com>2017-02-28 12:50:57 -0800
commita2670ee06b05c1abf31c11972319c6a59ef6940a (patch)
tree618c159bac47314bd0861ac79538ae44a365a869 /spec/features/projects/commit
parent05c8ec6cb85a3943b53cbd5757e7baea300dac68 (diff)
downloadgitlab-ce-a2670ee06b05c1abf31c11972319c6a59ef6940a.tar.gz
Show public RSS feeds to anonymous users
Diffstat (limited to 'spec/features/projects/commit')
-rw-r--r--spec/features/projects/commit/rss_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/features/projects/commit/rss_spec.rb b/spec/features/projects/commit/rss_spec.rb
new file mode 100644
index 00000000000..6e0e1916f87
--- /dev/null
+++ b/spec/features/projects/commit/rss_spec.rb
@@ -0,0 +1,27 @@
+require 'spec_helper'
+
+feature 'Project Commits RSS' do
+ let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
+ let(:path) { namespace_project_commits_path(project.namespace, project, :master) }
+
+ 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