From b39512ed755239198a9c294b6a45e65c05900235 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 18 Aug 2022 08:17:02 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-3-stable-ee --- spec/channels/application_cable/connection_spec.rb | 2 +- spec/channels/awareness_channel_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/channels') diff --git a/spec/channels/application_cable/connection_spec.rb b/spec/channels/application_cable/connection_spec.rb index f5b2cdd2fca..4943669bde0 100644 --- a/spec/channels/application_cable/connection_spec.rb +++ b/spec/channels/application_cable/connection_spec.rb @@ -21,7 +21,7 @@ RSpec.describe ApplicationCable::Connection, :clean_gitlab_redis_sessions do end context 'with a stale password' do - let(:partial_password_hash) { build(:user, password: 'some_old_password').authenticatable_salt } + let(:partial_password_hash) { build(:user, password: User.random_password).authenticatable_salt } let(:session_hash) { { 'warden.user.user.key' => [[user.id], partial_password_hash] } } it 'sets current_user to nil' do diff --git a/spec/channels/awareness_channel_spec.rb b/spec/channels/awareness_channel_spec.rb index 8d6dc36f6bd..47b1cd0188f 100644 --- a/spec/channels/awareness_channel_spec.rb +++ b/spec/channels/awareness_channel_spec.rb @@ -36,6 +36,7 @@ RSpec.describe AwarenessChannel, :clean_gitlab_redis_shared_state, type: :channe collaborator = { id: user.id, name: user.name, + username: user.username, avatar_url: user.avatar_url(size: 36), last_activity: Time.zone.now, last_activity_humanized: ActionController::Base.helpers.distance_of_time_in_words( @@ -63,7 +64,7 @@ RSpec.describe AwarenessChannel, :clean_gitlab_redis_shared_state, type: :channe session = AwarenessSession.for("/test") expect { subscription.unsubscribe_from_channel } - .to change { session.size}.by(-1) + .to change { session.size }.by(-1) end end end -- cgit v1.2.1