mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 11:02:30 +01:00
parent
2b85a05380
commit
3fdae1090b
@ -65,6 +65,10 @@ options '*' do
|
|||||||
200
|
200
|
||||||
end
|
end
|
||||||
|
|
||||||
|
before do
|
||||||
|
content_type 'application/json'
|
||||||
|
end
|
||||||
|
|
||||||
get '/' do
|
get '/' do
|
||||||
last_modified App.released_at
|
last_modified App.released_at
|
||||||
jsonp details: 'http://fixer.io', version: App.version
|
jsonp details: 'http://fixer.io', version: App.version
|
||||||
|
@ -96,4 +96,11 @@ describe 'the API' do
|
|||||||
get '/latest'
|
get '/latest'
|
||||||
last_response.body.must_equal 'foo'
|
last_response.body.must_equal 'foo'
|
||||||
end
|
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
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user