Sha256: 03d2cedca48284a02fba63f8352fd5fdeff98f1c2aa4f722630b23aa607965ac

Contents?: true

Size: 810 Bytes

Versions: 9

Compression:

Stored size: 810 Bytes

Contents

describe MangoPay::Client do
  include_context 'clients'

  describe 'CREATE' do
    it 'creates a new client' do
      expect(new_client['ClientId']).to eq(client_id)
      expect(new_client['Email']).not_to be_nil
      expect(new_client['Passphrase']).not_to be_nil
    end

    it 'refuses the client id' do
      expect { wrong_client['errors'] }.to raise_error { |err|
        expect(err).to be_a MangoPay::ResponseError
        expect(err.type).to eq 'param_error'
      }
    end

    it "ClientId_already_exist" do
      expect {
        MangoPay::Client.create({
          'ClientId' => new_client['ClientId'],
          'Name' => 'What a nice name',
          'Email' => 'clientemail@email.com'
        })
      }.to raise_error MangoPay::ResponseError
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mangopay-3.0.20 spec/mangopay/client_spec.rb
mangopay-3.0.19 spec/mangopay/client_spec.rb
mangopay-3.0.18 spec/mangopay/client_spec.rb
mangopay-3.0.17 spec/mangopay/client_spec.rb
mangopay-3.0.16 spec/mangopay/client_spec.rb
mangopay-3.0.15 spec/mangopay/client_spec.rb
mangopay-3.0.14 spec/mangopay/client_spec.rb
mangopay-3.0.13 spec/mangopay/client_spec.rb
mangopay-3.0.12 spec/mangopay/client_spec.rb