Commit 5acc3081 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'bvl-design-management-only-available-with-graphql' into 'master'

GraphQL is required for design management.

See merge request gitlab-org/gitlab-ee!10799
parents a5bab14d 97fb0355
......@@ -576,7 +576,9 @@ module EE
# Checking both feature availability on the license, as well as the feature
# flag, because we don't want to enable design_management by default on
# on prem installs yet.
feature_available?(:design_management) && ::Feature.enabled?(:design_management, self)
# GraphQL is also required for using Design Management
feature_available?(:design_management) && ::Feature.enabled?(:design_management, self) &&
::Gitlab::Graphql.enabled?
end
private
......
......@@ -1887,17 +1887,18 @@ describe Project do
describe "#design_management_enabled?" do
let(:project) { build(:project) }
where(:feature_enabled, :license_enabled, :expected) do
false | false | false
false | true | false
true | false | false
true | true | true
where(:feature_enabled, :license_enabled, :graphql, :expected) do
false | false | false | false
false | true | false | false
true | false | false | false
false | false | true | false
true | true | true | true
end
with_them do
before do
stub_licensed_features(design_management: license_enabled)
stub_feature_flags(design_management: feature_enabled)
stub_feature_flags(design_management: feature_enabled, graphql: graphql)
end
it "knows if design management is available" do
......
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