Sha256: 669a229b225d66f6e1f3e709818e39338ce69f72c069cd6132697964a325b2a2

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

require 'helper'

describe Acoustic::Client::RelationalTable do
  before do
    @client = Acoustic.new access_token: 'abc123', url: 'https://api-campaign-us-1.goacoustic.com'
  end

  describe '.insert_update_relational_table' do
    it 'returns the success as true' do
      stub_post('/XMLAPI')
      .with(body: '<Envelope><Body><InsertUpdateRelationalTable><TABLE_ID>86767</TABLE_ID><ROWS><ROW><COLUMN name="Record Id"><![CDATA[GHbjh73643hsdiy]]></COLUMN></ROW></ROWS></InsertUpdateRelationalTable></Body></Envelope>')
      .to_return status: 200,
                 body: fixture('relational_table.xml'),
                 headers: { 'Content-type' => 'text/xml', 'Authorization' => 'Bearer abc123' }

      resp = @client.insert_update_relational_table '86767', [{'Record Id' => 'GHbjh73643hsdiy'}]

      expect(resp.Envelope.Body.RESULT.SUCCESS).to eq('true')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
goacoustic-0.1.0 spec/client/relational_table_spec.rb