diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-15 08:19:01 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-15 08:19:01 +0000 |
commit | ddec8e777f31d747d8c5c6599acf6b84afeea92d (patch) | |
tree | 6b8f5a574f3c48b0af783bd74c63eb8b53b30bcf /spec/controllers | |
parent | 4e2f068c5fd7505be0674546ac977977152d3800 (diff) | |
parent | a434ffd3b3a895bd75daed76000def23f4002f5a (diff) | |
download | gitlab-ce-ddec8e777f31d747d8c5c6599acf6b84afeea92d.tar.gz |
Merge branch 'fix-redirect-profile-keys-new-to-profile-keys' into 'master'
Make /profile/keys/new redirects to /profile/keys for back-compat
This addresses https://github.com/gitlabhq/gitlabhq/issues/10138.
See merge request !3717
Diffstat (limited to 'spec/controllers')
-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 |