Sha256: 878c2ffadaf8fbc2973d818ed297526b8291678d82787dcc4bfc7ed13d808d53
Contents?: true
Size: 1.14 KB
Versions: 27
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' require 'td/client/spec_resources' require 'json' describe 'Access Control API' do include_context 'spec symbols' include_context 'common helper' let :api do # no retry for GET API.new(nil, {:max_cumul_retry_delay => -1}) end describe 'all apis' do it 'is deprecated' do stub_api_request(:post, "/v3/acl/grant").to_return(:status => 500) expect { api.grant_access_control('subject', 'action', 'scope', []) }.to raise_error(TreasureData::APIError) stub_api_request(:post, "/v3/acl/revoke").to_return(:status => 500) expect { api.revoke_access_control('subject', 'action', 'scope') }.to raise_error(TreasureData::APIError) stub_api_request(:get, "/v3/acl/test", :query => {'user' => 'user', 'action' => 'action', 'scope' => 'scope'}).to_return(:status => 422) expect { api.test_access_control('user', 'action', 'scope') }.to raise_error(TreasureData::APIError) stub_api_request(:get, "/v3/acl/list").to_return(:status => 500) expect { api.list_access_controls }.to raise_error(TreasureData::APIError) end end end
Version data entries
27 entries across 27 versions & 1 rubygems