3 class CollectionsApiTest < ActionDispatch::IntegrationTest
6 test "should get index" do
7 get "/arvados/v1/collections", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:active).api_token}"}
8 assert_response :success
9 assert_equal "arvados#collectionList", jresponse['kind']
12 test "controller 404 response is json" do
13 get "/arvados/v1/thingsthatdonotexist", {:format => :xml}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:active).api_token}"}
15 assert_equal 1, jresponse['errors'].length
16 assert_equal true, jresponse['errors'][0].is_a?(String)
19 test "object 404 response is json" do
20 get "/arvados/v1/groups/zzzzz-j7d0g-o5ba971173cup4f", {}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:active).api_token}"}
22 assert_equal 1, jresponse['errors'].length
23 assert_equal true, jresponse['errors'][0].is_a?(String)