Commit f3d80c03 authored by Stan Hu's avatar Stan Hu

Merge branch 'nicolasdular/32903-move-sign-up-specs' into 'master'

Remove non-api tests from api spec

Closes #32903

See merge request gitlab-org/gitlab!19219
parents 6a18f0b8 735146f3
......@@ -30,6 +30,7 @@ describe RegistrationsController do
it 'renders new template and sets the resource variable' do
expect(subject).to render_template(:new)
expect(response).to have_gitlab_http_status(200)
expect(assigns(:resource)).to be_a(User)
end
end
......@@ -47,6 +48,7 @@ describe RegistrationsController do
it 'renders new template and sets the resource variable' do
subject
expect(response).to have_gitlab_http_status(302)
expect(response).to redirect_to(new_user_session_path(anchor: 'register-pane'))
end
end
......
......@@ -635,32 +635,6 @@ describe API::Users do
end
end
describe "GET /users/sign_up" do
context 'when experimental signup_flow is active' do
before do
stub_experiment_for_user(signup_flow: true)
end
it "shows sign up page" do
get "/users/sign_up"
expect(response).to have_gitlab_http_status(200)
expect(response).to render_template(:new)
end
end
context 'when experimental signup_flow is not active' do
before do
stub_experiment_for_user(signup_flow: false)
end
it "redirects to sign in page" do
get "/users/sign_up"
expect(response).to have_gitlab_http_status(302)
expect(response).to redirect_to(new_user_session_path(anchor: 'register-pane'))
end
end
end
describe "PUT /users/:id" do
let!(:admin_user) { create(:admin) }
......
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