Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-10-18 14:28:12 +0300
committerJames Lopez <james@jameslopez.es>2018-10-23 17:22:12 +0300
commit782badd0a2cd00d2a9cbe591e78b30aca32e252b (patch)
treee5b15926abfa825f0807b98547bcfe1609b67a33 /spec/features
parent329aa24920d9bf385c244e648db4ab38dd3c23e8 (diff)
Fix content caching for non auth users
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb
index fb766addb31..0add129dde2 100644
--- a/spec/features/projects_spec.rb
+++ b/spec/features/projects_spec.rb
@@ -322,6 +322,22 @@ describe 'Project' do
end
end
+ context 'content is not cached after signing out', :js do
+ let(:user) { create(:user, project_view: 'activity') }
+ let(:project) { create(:project, :repository) }
+
+ it 'does not load activity', :js do
+ project.add_maintainer(user)
+ sign_in(user)
+ visit project_path(project)
+ sign_out(user)
+
+ page.evaluate_script('window.history.back()')
+
+ expect(page).not_to have_selector('.event-item')
+ end
+ end
+
def remove_with_confirm(button_text, confirm_with)
click_button button_text
fill_in 'confirm_name_input', with: confirm_with