From 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 19 Sep 2022 23:18:09 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-4-stable-ee --- spec/models/operations/feature_flag_spec.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'spec/models/operations') diff --git a/spec/models/operations/feature_flag_spec.rb b/spec/models/operations/feature_flag_spec.rb index e709470b312..85a475f5c53 100644 --- a/spec/models/operations/feature_flag_spec.rb +++ b/spec/models/operations/feature_flag_spec.rb @@ -55,7 +55,7 @@ RSpec.describe Operations::FeatureFlag do it 'is valid if associated with Operations::FeatureFlags::Strategy models' do project = create(:project) feature_flag = described_class.create!({ name: 'test', project: project, version: 2, - strategies_attributes: [{ name: 'default', parameters: {} }] }) + strategies_attributes: [{ name: 'default', parameters: {} }] }) expect(feature_flag).to be_valid end @@ -114,13 +114,11 @@ RSpec.describe Operations::FeatureFlag do let_it_be(:project) { create(:project) } let!(:feature_flag) do - create(:operations_feature_flag, project: project, - name: 'feature1', active: true, version: 2) + create(:operations_feature_flag, project: project, name: 'feature1', active: true, version: 2) end let!(:strategy) do - create(:operations_strategy, feature_flag: feature_flag, - name: 'default', parameters: {}) + create(:operations_strategy, feature_flag: feature_flag, name: 'default', parameters: {}) end it 'matches wild cards in the scope' do @@ -141,10 +139,8 @@ RSpec.describe Operations::FeatureFlag do it 'returns feature flags ordered by id' do create(:operations_scope, strategy: strategy, environment_scope: 'production') - feature_flag_b = create(:operations_feature_flag, project: project, - name: 'feature2', active: true, version: 2) - strategy_b = create(:operations_strategy, feature_flag: feature_flag_b, - name: 'default', parameters: {}) + feature_flag_b = create(:operations_feature_flag, project: project, name: 'feature2', active: true, version: 2) + strategy_b = create(:operations_strategy, feature_flag: feature_flag_b, name: 'default', parameters: {}) create(:operations_scope, strategy: strategy_b, environment_scope: '*') flags = described_class.for_unleash_client(project, 'production') -- cgit v1.2.3