Commit a3f60806 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'jejacks0n/maintenance/upgrade-to-using-assigned-not-variant' into 'master'

Use assigned.name instead of variant.name

See merge request gitlab-org/gitlab!80094
parents fc897527 fcb2488b
......@@ -73,7 +73,7 @@ module InviteMembersHelper
def show_invite_members_for_task?(source)
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
end
......
......@@ -87,7 +87,7 @@ class TrialsController < ApplicationController
def stored_location_or_provided_path(path)
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
else
path
......
......@@ -305,7 +305,7 @@ RSpec.describe ApplicationExperiment, :experiment do
end
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
......@@ -320,7 +320,7 @@ RSpec.describe ApplicationExperiment, :experiment do
# the control.
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
......
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