Commit fcb2488b authored by jejacks0n's avatar jejacks0n Committed by Mikołaj Wawrzyniak

Use assigned.name instead of variant.name

This resolves a deprecation warning emanating from within the
gitlab-experiment gem.
parent 3eb41e9d
...@@ -73,7 +73,7 @@ module InviteMembersHelper ...@@ -73,7 +73,7 @@ module InviteMembersHelper
def show_invite_members_for_task?(source) def show_invite_members_for_task?(source)
return unless current_user return unless current_user
invite_for_help_continuous_onboarding = source.is_a?(Project) && experiment(:invite_for_help_continuous_onboarding, namespace: source.namespace).variant.name == 'candidate' invite_for_help_continuous_onboarding = source.is_a?(Project) && experiment(:invite_for_help_continuous_onboarding, namespace: source.namespace).assigned.name == 'candidate'
params[:open_modal] == 'invite_members_for_task' || invite_for_help_continuous_onboarding params[:open_modal] == 'invite_members_for_task' || invite_for_help_continuous_onboarding
end end
......
...@@ -87,7 +87,7 @@ class TrialsController < ApplicationController ...@@ -87,7 +87,7 @@ class TrialsController < ApplicationController
def stored_location_or_provided_path(path) def stored_location_or_provided_path(path)
if current_user.setup_for_company && if current_user.setup_for_company &&
experiment(:combined_registration, user: current_user).variant.name == 'candidate' experiment(:combined_registration, user: current_user).assigned.name == 'candidate'
stored_location_for(:user) || path stored_location_for(:user) || path
else else
path path
......
...@@ -305,7 +305,7 @@ RSpec.describe ApplicationExperiment, :experiment do ...@@ -305,7 +305,7 @@ RSpec.describe ApplicationExperiment, :experiment do
end end
it "caches the variant determined by the variant resolver" do it "caches the variant determined by the variant resolver" do
expect(application_experiment.variant.name).to eq('candidate') # we should be in the experiment expect(application_experiment.assigned.name).to eq('candidate') # we should be in the experiment
application_experiment.run application_experiment.run
...@@ -320,7 +320,7 @@ RSpec.describe ApplicationExperiment, :experiment do ...@@ -320,7 +320,7 @@ RSpec.describe ApplicationExperiment, :experiment do
# the control. # the control.
stub_feature_flags(namespaced_stub: false) # simulate being not rolled out stub_feature_flags(namespaced_stub: false) # simulate being not rolled out
expect(application_experiment.variant.name).to eq('control') # if we ask, it should be control expect(application_experiment.assigned.name).to eq('control') # if we ask, it should be control
application_experiment.run application_experiment.run
......
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