Commit 5cec5cfa authored by Doug Stull's avatar Doug Stull

Merge branch 'update-gitlab-experiment-to-0.6.3' into 'master'

Release gitlab-experiment version 0.6.3

See merge request gitlab-org/gitlab!67074
parents c19fddba b630af0c
...@@ -488,7 +488,7 @@ gem 'flipper', '~> 0.21.0' ...@@ -488,7 +488,7 @@ gem 'flipper', '~> 0.21.0'
gem 'flipper-active_record', '~> 0.21.0' gem 'flipper-active_record', '~> 0.21.0'
gem 'flipper-active_support_cache_store', '~> 0.21.0' gem 'flipper-active_support_cache_store', '~> 0.21.0'
gem 'unleash', '~> 3.2.2' gem 'unleash', '~> 3.2.2'
gem 'gitlab-experiment', '~> 0.6.2' gem 'gitlab-experiment', '~> 0.6.3'
# Structured logging # Structured logging
gem 'lograge', '~> 0.5' gem 'lograge', '~> 0.5'
......
...@@ -463,7 +463,7 @@ GEM ...@@ -463,7 +463,7 @@ GEM
gitlab-dangerfiles (2.3.0) gitlab-dangerfiles (2.3.0)
danger (>= 8.3.1) danger (>= 8.3.1)
danger-gitlab (>= 8.0.0) danger-gitlab (>= 8.0.0)
gitlab-experiment (0.6.2) gitlab-experiment (0.6.3)
activesupport (>= 3.0) activesupport (>= 3.0)
request_store (>= 1.0) request_store (>= 1.0)
scientist (~> 1.6, >= 1.6.0) scientist (~> 1.6, >= 1.6.0)
...@@ -1468,7 +1468,7 @@ DEPENDENCIES ...@@ -1468,7 +1468,7 @@ DEPENDENCIES
github-markup (~> 1.7.0) github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5) gitlab-chronic (~> 0.10.5)
gitlab-dangerfiles (~> 2.3.0) gitlab-dangerfiles (~> 2.3.0)
gitlab-experiment (~> 0.6.2) gitlab-experiment (~> 0.6.3)
gitlab-fog-azure-rm (~> 1.1.1) gitlab-fog-azure-rm (~> 1.1.1)
gitlab-labkit (~> 0.21.0) gitlab-labkit (~> 0.21.0)
gitlab-license (~> 2.0) gitlab-license (~> 2.0)
......
...@@ -236,6 +236,11 @@ RSpec.describe ApplicationExperiment, :experiment do ...@@ -236,6 +236,11 @@ RSpec.describe ApplicationExperiment, :experiment do
expect(subject.process_redirect_url(url)).to be_nil expect(subject.process_redirect_url(url)).to be_nil
end end
end end
it "generates the correct urls based on where the engine was mounted" do
url = Rails.application.routes.url_helpers.experiment_redirect_url(subject, url: 'https://docs.gitlab.com')
expect(url).to include("/-/experiment/namespaced%2Fstub:#{subject.context.key}?https://docs.gitlab.com")
end
end end
context "when resolving variants" do context "when resolving variants" do
......
...@@ -30,9 +30,9 @@ RSpec.describe NewProjectReadmeContentExperiment, :experiment do ...@@ -30,9 +30,9 @@ RSpec.describe NewProjectReadmeContentExperiment, :experiment do
end end
it "renders redirect URLs" do it "renders redirect URLs" do
expect(markdown).to include( url = Rails.application.routes.url_helpers.experiment_redirect_url(subject, url: initial_url)
Rails.application.routes.url_helpers.experiment_redirect_url(subject, url: initial_url) expect(url).to include("/-/experiment/#{subject.to_param}?")
) expect(markdown).to include(url)
end end
end end
end end
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