Skip to content
Snippets Groups Projects
Commit fb919a63 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'dmedvinsky-username-keys-content-type'

parents 60c3e841 ac35ee37
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment