Commit 18d25b2e authored by Phil Hughes's avatar Phil Hughes

Merge branch '352231-cleanup-unused-variables' into 'master'

Removed fetching unused properties for subscription

See merge request gitlab-org/gitlab!83053
parents d725ea5e a062656e
...@@ -3,7 +3,6 @@ query State { ...@@ -3,7 +3,6 @@ query State {
id id
accountId accountId
name name
users
} }
activeSubscription @client { activeSubscription @client {
name name
......
...@@ -65,8 +65,6 @@ module SubscriptionsHelper ...@@ -65,8 +65,6 @@ module SubscriptionsHelper
id: namespace.id, id: namespace.id,
account_id: account_id, account_id: account_id,
name: namespace.name, name: namespace.name,
users: namespace.member_count,
guests: namespace.guest_count,
full_path: namespace.full_path full_path: namespace.full_path
} }
end end
......
...@@ -33,8 +33,8 @@ export const mockStoragePlans = [ ...@@ -33,8 +33,8 @@ export const mockStoragePlans = [
]; ];
export const mockNamespaces = ` export const mockNamespaces = `
[{"id":132,"accountId":"${accountId}","name":"Gitlab Org","users":3}, [{"id":132,"accountId":"${accountId}","name":"Gitlab Org"},
{"id":483,"accountId":null,"name":"Gnuwget","users":12}] {"id":483,"accountId":null,"name":"Gnuwget"}]
`; `;
export const mockParsedNamespaces = JSON.parse(mockNamespaces).map((namespace) => ({ export const mockParsedNamespaces = JSON.parse(mockNamespaces).map((namespace) => ({
......
...@@ -51,7 +51,7 @@ RSpec.describe SubscriptionsHelper do ...@@ -51,7 +51,7 @@ RSpec.describe SubscriptionsHelper do
it { is_expected.to include(plan_id: 'bronze_id') } it { is_expected.to include(plan_id: 'bronze_id') }
it { is_expected.to include(namespace_id: group.id.to_s) } it { is_expected.to include(namespace_id: group.id.to_s) }
it { is_expected.to include(source: 'some_source') } it { is_expected.to include(source: 'some_source') }
it { is_expected.to include(group_data: %Q{[{"id":#{group.id},"account_id":null,"name":"My Namespace","users":2,"guests":1,"full_path":"my_namespace"}]}) } it { is_expected.to include(group_data: %Q{[{"id":#{group.id},"account_id":null,"name":"My Namespace","full_path":"my_namespace"}]}) }
it { is_expected.to include(trial: 'false') } it { is_expected.to include(trial: 'false') }
it { is_expected.to include(new_trial_registration_path: '/-/trial_registrations/new') } it { is_expected.to include(new_trial_registration_path: '/-/trial_registrations/new') }
...@@ -163,7 +163,7 @@ RSpec.describe SubscriptionsHelper do ...@@ -163,7 +163,7 @@ RSpec.describe SubscriptionsHelper do
it { is_expected.to include(namespace_id: group.id.to_s) } it { is_expected.to include(namespace_id: group.id.to_s) }
it { is_expected.to include(active_subscription: active_subscription) } it { is_expected.to include(active_subscription: active_subscription) }
it { is_expected.to include(source: 'some_source') } it { is_expected.to include(source: 'some_source') }
it { is_expected.to include(group_data: %Q{[{"id":#{group.id},"account_id":"#{account_id}","name":"My Namespace","users":1,"guests":0,"full_path":"my_namespace"}]}) } it { is_expected.to include(group_data: %Q{[{"id":#{group.id},"account_id":"#{account_id}","name":"My Namespace","full_path":"my_namespace"}]}) }
it { is_expected.to include(redirect_after_success: group_usage_quotas_path(group, anchor: anchor, purchased_product: purchased_product)) } it { is_expected.to include(redirect_after_success: group_usage_quotas_path(group, anchor: anchor, purchased_product: purchased_product)) }
end 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