Skip to content
代码片段 群组 项目
提交 bd7a2f13 编辑于 作者: Vijay Hawoldar's avatar Vijay Hawoldar
浏览文件

Include purchased storage in banner

Combined storage and free user limit banners should include any
purchased storage as part of the limit
上级 c4cd74ed
No related branches found
No related tags found
无相关合并请求
......@@ -93,7 +93,7 @@ def free_users_limit
end
def free_storage_limit
limit = root_namespace.actual_limits.storage_size_limit.megabytes
limit = ::Namespaces::Storage::RootSize.new(root_namespace).dashboard_limit
number_to_human_size(limit, precision: 0)
end
......
......@@ -88,6 +88,15 @@
expect(page).to have_content(alert_title)
end
end
context 'when the user has purchased additional storage' do
it 'includes the purchased storage in the alert' do
namespace.additional_purchased_storage_size = 10_240
render_inline(component)
expect(page).to have_content('15 GiB')
end
end
end
context 'when not over one of the limits' do
......
......@@ -88,6 +88,15 @@
expect(page).to have_content(alert_title)
end
end
context 'when the user has purchased additional storage' do
it 'includes the purchased storage in the alert' do
namespace.additional_purchased_storage_size = 10_240
render_inline(component)
expect(page).to have_content('15 GiB')
end
end
end
context 'when not over one of the limits' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册