diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-16 21:10:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-16 21:10:10 +0300 |
commit | d755061465c24de58568183df5e7b826e934ae5d (patch) | |
tree | b378078e37c3ae384ea7e3b7ca91398754fd7fac /spec/routing | |
parent | 6364c14cc1f445d471bca118dca5af5a85b2c5dc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/routing_spec.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index cbfb9f080ce..26ad1f14786 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -4,6 +4,7 @@ require 'spec_helper' # user GET /:username # user_ssh_keys GET /:username.keys +# user_gpg_keys GET /:username.gpg # user_groups GET /users/:username/groups(.:format) # user_projects GET /users/:username/projects(.:format) # user_contributed_projects GET /users/:username/contributed(.:format) @@ -17,6 +18,12 @@ RSpec.describe UsersController, "routing" do expect(get("/User")).to route_to('users#show', username: 'User') end + it "to #gpg_keys" do + allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true) + + expect(get("/User.gpg")).to route_to('users#gpg_keys', username: 'User') + end + it "to #groups" do expect(get("/users/User/groups")).to route_to('users#groups', username: 'User') end @@ -197,12 +204,6 @@ RSpec.describe Profiles::GpgKeysController, "routing" do it "to #destroy" do expect(delete("/profile/gpg_keys/1")).to route_to('profiles/gpg_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.gpg")).to route_to('profiles/gpg_keys#get_keys', username: 'foo') - end end # emails GET /emails(.:format) emails#index |