summaryrefslogtreecommitdiff
path: root/spec/features/users/terms_spec.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-01 16:44:54 -0700
committerStan Hu <stanhu@gmail.com>2019-07-01 22:23:01 -0700
commit045ab84e0b54dd2b8c03d281a8d4f9c15ae26a6e (patch)
tree3103be220ae55e425f2a1858fc63c45d3b5690ae /spec/features/users/terms_spec.rb
parent07f879f8909572a13256b8a7c5d8cf3c9d16a230 (diff)
downloadgitlab-ce-045ab84e0b54dd2b8c03d281a8d4f9c15ae26a6e.tar.gz
Fix broken specs due to cached application settings
The /admin panel will now always return an uncached application setting to ensure it always has the most current info.
Diffstat (limited to 'spec/features/users/terms_spec.rb')
-rw-r--r--spec/features/users/terms_spec.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb
index 84df1016594..a770309e6b0 100644
--- a/spec/features/users/terms_spec.rb
+++ b/spec/features/users/terms_spec.rb
@@ -81,15 +81,18 @@ describe 'Users > Terms' do
enforce_terms
- within('.nav-sidebar') do
- click_link 'Issues'
- end
+ # Application settings are cached for a minute
+ Timecop.travel 2.minutes do
+ within('.nav-sidebar') do
+ click_link 'Issues'
+ end
- expect_to_be_on_terms_page
+ expect_to_be_on_terms_page
- click_button('Accept terms')
+ click_button('Accept terms')
- expect(current_path).to eq(project_issues_path(project))
+ expect(current_path).to eq(project_issues_path(project))
+ end
end
# Disabled until https://gitlab.com/gitlab-org/gitlab-ce/issues/37162 is solved properly