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>2021-10-27 15:09:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-27 15:09:41 +0300
commit0a559c913e4d333f339fcc03b89bfeade9ca0b93 (patch)
tree12175c0e0b5b97a72250acb8261d1c2512ef6bae /spec/controllers/projects
parentef96d56ed3c723ac913ea4d8ab6504043f849555 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/issues_controller_spec.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb
index 0b3bd4d78ac..382ce0feda0 100644
--- a/spec/controllers/projects/issues_controller_spec.rb
+++ b/spec/controllers/projects/issues_controller_spec.rb
@@ -1084,28 +1084,30 @@ RSpec.describe Projects::IssuesController do
end
context 'real-time sidebar feature flag' do
- using RSpec::Parameterized::TableSyntax
-
let_it_be(:project) { create(:project, :public) }
let_it_be(:issue) { create(:issue, project: project) }
- where(:action_cable_in_app_enabled, :feature_flag_enabled, :gon_feature_flag) do
- true | true | true
- true | false | true
- false | true | true
- false | false | false
+ context 'when enabled' do
+ before do
+ stub_feature_flags(real_time_issue_sidebar: true)
+ end
+
+ it 'pushes the correct value to the frontend' do
+ go(id: issue.to_param)
+
+ expect(Gon.features).to include('realTimeIssueSidebar' => true)
+ end
end
- with_them do
+ context 'when disabled' do
before do
- expect(Gitlab::ActionCable::Config).to receive(:in_app?).and_return(action_cable_in_app_enabled)
- stub_feature_flags(real_time_issue_sidebar: feature_flag_enabled)
+ stub_feature_flags(real_time_issue_sidebar: false)
end
- it 'broadcasts to the issues channel based on ActionCable and feature flag values' do
+ it 'pushes the correct value to the frontend' do
go(id: issue.to_param)
- expect(Gon.features).to include('realTimeIssueSidebar' => gon_feature_flag)
+ expect(Gon.features).to include('realTimeIssueSidebar' => false)
end
end
end