From 2d54dfb25134cbdf5b4f506b69d13241130bc132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 6 Apr 2018 14:40:33 +0200 Subject: Migrate features/project/project.feature to RSpec and reorganize several Project feature specs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- spec/features/projects/show/rss_spec.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spec/features/projects/show/rss_spec.rb (limited to 'spec/features/projects/show/rss_spec.rb') diff --git a/spec/features/projects/show/rss_spec.rb b/spec/features/projects/show/rss_spec.rb new file mode 100644 index 00000000000..d02eaf34533 --- /dev/null +++ b/spec/features/projects/show/rss_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +feature 'Projects > Show > RSS' do + let(:user) { create(:user) } + let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } + let(:path) { project_path(project) } + + context 'when signed in' do + before do + project.add_developer(user) + sign_in(user) + visit path + end + + it_behaves_like "an autodiscoverable RSS feed with current_user's RSS token" + end + + context 'when signed out' do + before do + visit path + end + + it_behaves_like "an autodiscoverable RSS feed without an RSS token" + end +end -- cgit v1.2.1