From 3172281335efddd1078fa6c601f3ba8782f73192 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 11 Dec 2020 18:09:57 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/routing/routing_spec.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'spec/routing') 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 -- cgit v1.2.3