summaryrefslogtreecommitdiff
path: root/spec/controllers/invites_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 16:05:49 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 16:05:49 +0000
commit43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch)
treedceebdc68925362117480a5d672bcff122fb625b /spec/controllers/invites_controller_spec.rb
parent20c84b99005abd1c82101dfeff264ac50d2df211 (diff)
downloadgitlab-ce-16.0.0-rc42.tar.gz
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc4216-0-stable
Diffstat (limited to 'spec/controllers/invites_controller_spec.rb')
-rw-r--r--spec/controllers/invites_controller_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb
index b3b7753df61..f3b21e191c4 100644
--- a/spec/controllers/invites_controller_spec.rb
+++ b/spec/controllers/invites_controller_spec.rb
@@ -192,6 +192,26 @@ RSpec.describe InvitesController do
expect(session[:invite_email]).to eq(member.invite_email)
end
+ context 'with stored location for user' do
+ it 'stores the correct path for user' do
+ request
+
+ expect(controller.stored_location_for(:user)).to eq(activity_project_path(member.source))
+ end
+
+ context 'with relative root' do
+ before do
+ stub_default_url_options(script_name: '/gitlab')
+ end
+
+ it 'stores the correct path for user' do
+ request
+
+ expect(controller.stored_location_for(:user)).to eq(activity_project_path(member.source))
+ end
+ end
+ end
+
context 'when it is part of our invite email experiment' do
let(:extra_params) { { invite_type: 'initial_email' } }