Commit 395233b7 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '322546-fix-subscription-banner-for-new-project' into 'master'

Fix subscription banner on New Project page

See merge request gitlab-org/gitlab!56443
parents a02b5cf5 ac2438d9
......@@ -58,7 +58,9 @@ module EE
def decorated_subscription
entity = @project || @group
subscription = entity&.closest_gitlab_subscription
return unless entity && entity.persisted?
subscription = entity.closest_gitlab_subscription
return unless subscription
......
---
title: Fix subscription banner on New Project page
merge_request: 56443
author:
type: fixed
......@@ -3,6 +3,21 @@
require 'spec_helper'
RSpec.describe EE::SubscribableBannerHelper do
describe '#renew_subscription_path' do
it 'does not raise error if available project is not persisted' do
assign(:project, Project.new)
expect { helper.renew_subscription_path }.not_to raise_error
end
it 'does not raise error if entity is not available' do
assign(:project, nil)
assign(:group, nil)
expect { helper.renew_subscription_path }.not_to raise_error
end
end
describe '#gitlab_subscription_or_license' do
subject { helper.gitlab_subscription_or_license }
......
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