mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 02:52:49 +01:00
parent
2b85a05380
commit
3fdae1090b
@ -65,6 +65,10 @@ options '*' do
|
||||
200
|
||||
end
|
||||
|
||||
before do
|
||||
content_type 'application/json'
|
||||
end
|
||||
|
||||
get '/' do
|
||||
last_modified App.released_at
|
||||
jsonp details: 'http://fixer.io', version: App.version
|
||||
|
@ -96,4 +96,11 @@ describe 'the API' do
|
||||
get '/latest'
|
||||
last_response.body.must_equal 'foo'
|
||||
end
|
||||
|
||||
it 'sets Content-Type header to JSON when caching' do
|
||||
2.times do
|
||||
get '/latest'
|
||||
last_response.headers['Content-Type'].must_equal 'application/json'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user