Skip to content
代码片段 群组 项目
提交 f6ddd1b3 编辑于 作者: Heinrich Lee Yu's avatar Heinrich Lee Yu
浏览文件

Merge branch 'incubation_5mp_google_cloud_backend_menu_fixups' into 'master'

Improve `Project :: Infra :: Google Cloud` Menu

See merge request gitlab-org/gitlab!73889
No related branches found
No related tags found
无相关合并请求
......@@ -100,7 +100,7 @@ def google_cloud_menu_item
::Sidebars::MenuItem.new(
title: _('Google Cloud'),
link: project_google_cloud_index_path(context.project),
active_routes: {},
active_routes: { controller: :google_cloud },
item_id: :google_cloud
)
end
......
......@@ -51,6 +51,16 @@
it 'menu link points to Terraform page' do
expect(subject.link).to eq find_menu_item(:terraform).link
end
context 'when Terraform menu is not visible' do
before do
subject.renderable_items.delete(find_menu_item(:terraform))
end
it 'menu link points to Google Cloud page' do
expect(subject.link).to eq find_menu_item(:google_cloud).link
end
end
end
end
......@@ -89,5 +99,11 @@ def find_menu_item(menu_item)
it_behaves_like 'access rights checks'
end
describe 'Google Cloud' do
let(:item_id) { :google_cloud }
it_behaves_like 'access rights checks'
end
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册