diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-11 21:09:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-11 21:09:57 +0300 |
commit | 3172281335efddd1078fa6c601f3ba8782f73192 (patch) | |
tree | f26352ede418cecb20b3f08b6bd04c0d7830e231 /spec/routing | |
parent | a8704bd33cb36b4e7e88bb10d61265b8ad8a058c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/routing_spec.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 0f931e7cc9e..cbfb9f080ce 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -2,7 +2,8 @@ require 'spec_helper' -# user GET /users/:username/ +# user GET /:username +# user_ssh_keys GET /:username.keys # user_groups GET /users/:username/groups(.:format) # user_projects GET /users/:username/projects(.:format) # user_contributed_projects GET /users/:username/contributed(.:format) @@ -32,6 +33,13 @@ RSpec.describe UsersController, "routing" do expect(get("/users/User/snippets")).to route_to('users#snippets', username: 'User') end + # get all the ssh-keys of a user + it "to #ssh_keys" do + allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true) + + expect(get("/User.keys")).to route_to('users#ssh_keys', username: 'User') + end + it "to #calendar" do expect(get("/users/User/calendar")).to route_to('users#calendar', username: 'User') end @@ -171,12 +179,6 @@ RSpec.describe Profiles::KeysController, "routing" do it "to #destroy" do expect(delete("/profile/keys/1")).to route_to('profiles/keys#destroy', id: '1') end - - it "to #get_keys" do - allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true) - - expect(get("/foo.keys")).to route_to('profiles/keys#get_keys', username: 'foo') - end end # keys GET /gpg_keys gpg_keys#index |