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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 00:08:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 00:08:11 +0300
commit19db7fd1fefc4e4249d4e55f409f321fdb85aed1 (patch)
tree0093c7fa3eb11954b49c828b78caae28f5fb97c2 /spec/features/users
parent8fa0c53e26c947ac647b8067fde3e9673b77b1a6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/users')
-rw-r--r--spec/features/users/active_sessions_spec.rb26
1 files changed, 15 insertions, 11 deletions
diff --git a/spec/features/users/active_sessions_spec.rb b/spec/features/users/active_sessions_spec.rb
index e2ee78a7cc5..1605073acda 100644
--- a/spec/features/users/active_sessions_spec.rb
+++ b/spec/features/users/active_sessions_spec.rb
@@ -4,25 +4,29 @@ require 'spec_helper'
RSpec.describe 'Active user sessions', :clean_gitlab_redis_sessions do
it 'successful login adds a new active user login' do
+ user = create(:user)
+
now = Time.zone.parse('2018-03-12 09:06')
- Timecop.freeze(now) do
- user = create(:user)
+ travel_to(now) do
gitlab_sign_in(user)
expect(page).to have_current_path root_path, ignore_query: true
sessions = ActiveSession.list(user)
expect(sessions.count).to eq 1
+ gitlab_sign_out
+ end
- # refresh the current page updates the updated_at
- Timecop.freeze(now + 1.minute) do
- visit current_path
+ # refresh the current page updates the updated_at
+ travel_to(now + 1.minute) do
+ gitlab_sign_in(user)
+
+ visit current_path
- sessions = ActiveSession.list(user)
- expect(sessions.first).to have_attributes(
- created_at: Time.zone.parse('2018-03-12 09:06'),
- updated_at: Time.zone.parse('2018-03-12 09:07')
- )
- end
+ sessions = ActiveSession.list(user)
+ expect(sessions.first).to have_attributes(
+ created_at: Time.zone.parse('2018-03-12 09:06'),
+ updated_at: Time.zone.parse('2018-03-12 09:07')
+ )
end
end