Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rsa controller should responds with text/plain

  • Loading branch information...
commit 9fde7737d45f5b1ab443dab8dace6227a26e4092 1 parent 66bd802
@bkeepers bkeepers authored
View
2  app/controllers/auth/rsa_controller.rb
@@ -3,7 +3,7 @@ class Auth::RsaController < ApplicationController
def create
challenge = RsaChallenge::Request.new(request.raw_post)
- render :json => challenge.value
+ render :text => challenge.value, :content_type => 'text/plain'
end
def update
View
4 spec/controllers/auth/rsa_controller_spec.rb
@@ -12,6 +12,10 @@
expect(subject).to be_success
end
+ it 'responds with text/plain content type' do
+ expect(subject.content_type).to eq('text/plain')
+ end
+
it 'returns a challenge' do
challenge = mock(:value => "foo")
RsaChallenge::Request.should_receive(:new).and_return(challenge)

0 comments on commit 9fde773

Please sign in to comment.
Something went wrong with that request. Please try again.