diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 08:17:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 08:17:02 +0000 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /spec/channels | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) | |
download | gitlab-ce-b39512ed755239198a9c294b6a45e65c05900235.tar.gz |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/channels')
-rw-r--r-- | spec/channels/application_cable/connection_spec.rb | 2 | ||||
-rw-r--r-- | spec/channels/awareness_channel_spec.rb | 3 |
2 files changed, 3 insertions, 2 deletions
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 |