Skip to content

Commit 9a053be

Browse files
committed
fix: master branch update issues
1 parent b7d9c58 commit 9a053be

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/optimizely.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ def get_enabled_features(user_id, attributes = nil)
315315

316316
return enabled_features unless user_inputs_valid?(attributes)
317317

318-
return enabled_features unless user_inputs_valid?(attributes)
319-
320318
@config.feature_flags.each do |feature|
321319
enabled_features.push(feature['key']) if is_feature_enabled(
322320
feature['key'],

spec/project_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ class InvalidErrorHandler; end
910910
expect(error_handler).to receive(:handle_error).once.with(Optimizely::InvalidAttributeFormatError)
911911
expect(project_instance.is_feature_enabled('multi_variate_feature', 'test_user', 'invalid')).to be false
912912
end
913-
913+
914914
it 'should log and raise an exception when called with attributes in an invalid format' do
915915
expect_any_instance_of(Optimizely::RaiseErrorHandler).to receive(:handle_error).once.with(Optimizely::InvalidAttributeFormatError)
916916
expect(project_instance.is_feature_enabled('multi_variate_feature', 'test_user', 'invalid_attributes')).to be false
@@ -1394,7 +1394,7 @@ class InvalidErrorHandler; end
13941394

13951395
it 'should log and raise an exception when called with attributes in an invalid format' do
13961396
expect_any_instance_of(Optimizely::RaiseErrorHandler).to receive(:handle_error).once.with(Optimizely::InvalidAttributeFormatError)
1397-
expect(project_instance.get_feature_variable_integer('integer_single_variable_feature', 'integer_variable', user_id, 'invalid_attributes')).to eq(nil)
1397+
expect(project_instance.get_feature_variable_integer('integer_single_variable_feature', 'integer_variable', 'test_user', 'invalid_attributes')).to eq(nil)
13981398
expect(spy_logger).to have_received(:log).once.with(Logger::ERROR, 'Provided attributes are in an invalid format.')
13991399
end
14001400
end

0 commit comments

Comments
 (0)