Commit d2eb2513 authored by Sean McGivern's avatar Sean McGivern

Merge branch...

Merge branch '233833-205909-224716-mlunoe-reinstate-instance-value-stream-analytics-sidebar-templates' into 'master'

Fix(Instance VSA): reinstate sidebar templates

See merge request gitlab-org/gitlab!41580
parents ea9078dd 49feaa8c
......@@ -4,7 +4,6 @@ namespace :analytics do
root to: redirect('admin/dev_ops_report')
constraints(-> (req) { Gitlab::Analytics.cycle_analytics_enabled? }) do
resource :cycle_analytics, only: :show, path: 'value_stream_analytics'
scope module: :cycle_analytics, as: 'cycle_analytics', path: 'value_stream_analytics' do
resources :stages, only: [:index, :create, :update, :destroy] do
member do
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Analytics::CycleAnalyticsController do
let(:user) { create(:user) }
before do
sign_in(user)
end
describe 'usage counter' do
it 'increments usage counter' do
expect(Gitlab::UsageDataCounters::CycleAnalyticsCounter).to receive(:count).with(:views)
get(:show)
expect(response).to be_successful
end
end
describe 'GET show' do
it 'renders `show` template' do
stub_feature_flags(Gitlab::Analytics::CYCLE_ANALYTICS_FEATURE_FLAG => true)
get :show
expect(response).to render_template :show
end
it 'renders `404` when feature flag is disabled' do
stub_feature_flags(Gitlab::Analytics::CYCLE_ANALYTICS_FEATURE_FLAG => false)
get :show
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment