Sha256: cd11484ff629a37fe70e97d7afaff3152ddd4e7b5c9d186066e51931d637154a
Contents?: true
Size: 714 Bytes
Versions: 3
Compression:
Stored size: 714 Bytes
Contents
require 'spec_helper' describe 'api error', type: :acceptance do let(:api) { make_direct_api_client } before do request_body = { method: 'get', params: {} } response_body = { error: { error_code: 54, error_string: 'No rights', error_detail: 'No rights to indicated client' } } stub_direct_api_request(:campaigns, request_body, response_body) end subject(:response) { api.campaigns.get } it 'return error' do expect(response.error?).to be_truthy expect(response.error.code).to eq(54) expect(response.error.message).to eq('No rights') expect(response.error.details).to eq('No rights to indicated client') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
direct-api-v5-0.1.2 | spec/acceptance/error_spec.rb |
direct-api-v5-0.1.1 | spec/acceptance/error_spec.rb |
direct-api-v5-0.1.0 | spec/acceptance/error_spec.rb |