diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-14 12:20:16 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-15 09:45:58 +0200 |
commit | a434ffd3b3a895bd75daed76000def23f4002f5a (patch) | |
tree | 9b94c5ec8da08a570a172ca6d3ba9d92619cd9b1 /spec/controllers/profiles | |
parent | 595aba54afce01a7903990f6630ae03de1c4d61e (diff) | |
download | gitlab-ce-a434ffd3b3a895bd75daed76000def23f4002f5a.tar.gz |
Make /profile/keys/new redirects to /profile/keys for back-compat
Report: https://github.com/gitlabhq/gitlabhq/issues/10138
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/controllers/profiles')
-rw-r--r-- | spec/controllers/profiles/keys_controller_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/controllers/profiles/keys_controller_spec.rb b/spec/controllers/profiles/keys_controller_spec.rb index b6573f105dc..3a82083717f 100644 --- a/spec/controllers/profiles/keys_controller_spec.rb +++ b/spec/controllers/profiles/keys_controller_spec.rb @@ -1,7 +1,17 @@ require 'spec_helper' describe Profiles::KeysController do - let(:user) { create(:user) } + let(:user) { create(:user) } + + describe '#new' do + before { sign_in(user) } + + it 'redirect to #index' do + get :new + + expect(response).to redirect_to(profile_keys_path) + end + end describe "#get_keys" do describe "non existant user" do |