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:
Diffstat (limited to 'spec/channels/issues_channel_spec.rb')
-rw-r--r--spec/channels/issues_channel_spec.rb36
1 files changed, 0 insertions, 36 deletions
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