summaryrefslogtreecommitdiff
path: root/spec/features/projects/activity
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-04-09 19:26:29 +0200
committerRobert Speicher <rspeicher@gmail.com>2018-04-09 18:04:09 -0500
commit13f7415afd3fe32cb7d5c7f8a89ce332d08f143e (patch)
treefcd8fd5bb3375352533ecd14b2bf1be9ee0f54a8 /spec/features/projects/activity
parent2d54dfb25134cbdf5b4f506b69d13241130bc132 (diff)
downloadgitlab-ce-13f7415afd3fe32cb7d5c7f8a89ce332d08f143e.tar.gz
Address review feedback
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features/projects/activity')
-rw-r--r--spec/features/projects/activity/rss_spec.rb7
-rw-r--r--spec/features/projects/activity/user_sees_activity_spec.rb19
2 files changed, 5 insertions, 21 deletions
diff --git a/spec/features/projects/activity/rss_spec.rb b/spec/features/projects/activity/rss_spec.rb
index 2693e539268..cd1cfe07998 100644
--- a/spec/features/projects/activity/rss_spec.rb
+++ b/spec/features/projects/activity/rss_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
feature 'Project Activity RSS' do
- let(:user) { create(:user) }
- let(:project) { create(:project, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
+ let(:project) { create(:project, :public) }
+ let(:user) { project.owner }
let(:path) { activity_project_path(project) }
before do
@@ -11,8 +11,7 @@ feature 'Project Activity RSS' do
context 'when signed in' do
before do
- project.add_developer(user)
- sign_in(user)
+ sign_in(project.owner)
visit path
end
diff --git a/spec/features/projects/activity/user_sees_activity_spec.rb b/spec/features/projects/activity/user_sees_activity_spec.rb
index a1252a13260..644a837dc14 100644
--- a/spec/features/projects/activity/user_sees_activity_spec.rb
+++ b/spec/features/projects/activity/user_sees_activity_spec.rb
@@ -15,22 +15,7 @@ feature 'Projects > Activity > User sees activity' do
visit activity_project_path(project)
end
- shared_examples 'push appears in activity' do
- it 'shows the last push in the activity page', :js do
- expect(page).to have_content "#{user.name} pushed new branch fix"
- end
- end
-
- context 'when signed in' do
- before do
- project.add_developer(user)
- sign_in(user)
- end
-
- it_behaves_like 'push appears in activity'
- end
-
- context 'when signed out' do
- it_behaves_like 'push appears in activity'
+ it 'shows the last push in the activity page', :js do
+ expect(page).to have_content "#{user.name} pushed new branch fix"
end
end