spec/lib/moneta/api/service_spec.rb in moneta-api-1.13.0 vs spec/lib/moneta/api/service_spec.rb in moneta-api-2.0.0.rc1

- old
+ new

@@ -6,11 +6,11 @@ subject { service.find_account_by_id(account_id) } context 'when success response' do let(:account_id) { 10999 } - its('account.id') { is_expected.to eq '10999' } + its('account.id') { is_expected.to eq 10999 } end context 'when soap raise error' do let(:account_id) { -1 } @@ -22,20 +22,20 @@ it { expect { subject }.to raise_exception(Moneta::Api::HTTPException) } end end - describe 'wsdl url' do - subject{ service.client.globals.instance_variable_get('@options')[:wsdl] } + describe 'service url' do + subject{ service.instance_variable_get('@connection') } context 'when demo mode' do - it { is_expected.to eq 'https://demo.moneta.ru/services.wsdl' } + its(:host) { is_expected.to eq 'demo.moneta.ru' } end context 'when demo mode' do let(:params) { {} } - it { is_expected.to eq 'https://www.moneta.ru/services.wsdl' } + its(:host) { is_expected.to eq 'www.moneta.ru' } end end describe 'request validate' do it { expect { service.authorise_transaction('invalid request') }.to raise_exception(TypeError, "String can't be coerced into Moneta::Api::Requests::AuthoriseTransactionRequest") }