3 class Arvados::V1::SchemaControllerTest < ActionController::TestCase
5 test "should get fresh discovery document" do
8 assert_response :success
9 discovery_doc = JSON.parse(@response.body)
10 assert_equal 'discovery#restDescription', discovery_doc['kind']
12 Time.now - MAX_SCHEMA_AGE.seconds < discovery_doc['generatedAt'],
13 "discovery document was generated >#{MAX_SCHEMA_AGE}s ago")
16 test "discovery document has defaultTrashLifetime" do
18 assert_response :success
19 discovery_doc = JSON.parse(@response.body)
20 assert_includes discovery_doc, 'defaultTrashLifetime'
21 assert_equal discovery_doc['defaultTrashLifetime'], Rails.application.config.default_trash_lifetime