From 158548078665a076f33ed161967f030653586f24 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 17 May 2021 03:10:45 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/channels/issues_channel_spec.rb | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 spec/channels/issues_channel_spec.rb (limited to 'spec/channels') diff --git a/spec/channels/issues_channel_spec.rb b/spec/channels/issues_channel_spec.rb deleted file mode 100644 index 4c860402f03..00000000000 --- a/spec/channels/issues_channel_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe IssuesChannel do - let_it_be(:issue) { create(:issue) } - - it 'rejects when project path is invalid' do - subscribe(project_path: 'invalid_project_path', iid: issue.iid) - - expect(subscription).to be_rejected - end - - it 'rejects when iid is invalid' do - subscribe(project_path: issue.project.full_path, iid: non_existing_record_iid) - - expect(subscription).to be_rejected - end - - it 'rejects when the user does not have access' do - stub_action_cable_connection current_user: nil - - subscribe(project_path: issue.project.full_path, iid: issue.iid) - - expect(subscription).to be_rejected - end - - it 'subscribes to a stream when the user has access' do - stub_action_cable_connection current_user: issue.author - - subscribe(project_path: issue.project.full_path, iid: issue.iid) - - expect(subscription).to be_confirmed - expect(subscription).to have_stream_for(issue) - end -end -- cgit v1.2.3