Add feature flag for the GraphQL API
This commit is contained in:
committed by
Javi Martín
parent
bb627a7117
commit
0063e7b4d8
@@ -90,4 +90,13 @@ describe GraphqlController, type: :request do
|
||||
expect(response).to have_http_status(:ok)
|
||||
end
|
||||
end
|
||||
|
||||
context "feature flag is set to false" do
|
||||
before { Setting["feature.graphql_api"] = false }
|
||||
|
||||
it "is disabled" do
|
||||
expect { get "/graphql" }.to raise_exception(FeatureFlags::FeatureDisabled)
|
||||
expect { post "/graphql" }.to raise_exception(FeatureFlags::FeatureDisabled)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user