Merge branch 'username-keys-content-type' of https://github.com/dmedvinsky/gitlabhq into dmedvinsky-username-keys-content-type
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: CHANGELOG
This commit is contained in:
commit
ac35ee3707
|
@ -30,6 +30,7 @@ v 6.7.0
|
|||
- Requires at least 2 unicorn workers
|
||||
- Requires gitlab-shell v1.9+
|
||||
- Replaced gemoji(due to closed licencing problem) with Phantom Open Emoji library(combined SIL Open Font License, MIT License and the CC 3.0 License)
|
||||
- Fix `/:username.keys` response content type (Dmitry Medvinsky)
|
||||
|
||||
v 6.6.5
|
||||
- Added option to remove issue assignee on project issue page and issue edit page (Jason Blanchard)
|
||||
|
|
|
@ -41,7 +41,7 @@ class Profiles::KeysController < ApplicationController
|
|||
begin
|
||||
user = User.find_by_username(params[:username])
|
||||
if user.present?
|
||||
render text: user.all_ssh_keys.join("\n")
|
||||
render text: user.all_ssh_keys.join("\n"), content_type: "text/plain"
|
||||
else
|
||||
render_404 and return
|
||||
end
|
||||
|
|
|
@ -24,6 +24,11 @@ describe Profiles::KeysController do
|
|||
|
||||
expect(response.body).to eq("")
|
||||
end
|
||||
|
||||
it "should respond with text/plain content type" do
|
||||
get :get_keys, username: user.username
|
||||
expect(response.content_type).to eq("text/plain")
|
||||
end
|
||||
end
|
||||
|
||||
describe "user with keys" do
|
||||
|
@ -44,6 +49,11 @@ describe Profiles::KeysController do
|
|||
expect(response.body).not_to eq("")
|
||||
expect(response.body).to eq(user.all_ssh_keys.join("\n"))
|
||||
end
|
||||
|
||||
it "should respond with text/plain content type" do
|
||||
get :get_keys, username: user.username
|
||||
expect(response.content_type).to eq("text/plain")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue