Sha256: eda3c38a3ecd77422699f3ff486d5d7552842755bcd2ed3b08fcbbd953da3ede

Contents?: true

Size: 807 Bytes

Versions: 3

Compression:

Stored size: 807 Bytes

Contents

describe 'Deals pipeline API Live test', live: true do

  before do
    Hubspot.configure hapikey: 'demo'
  end

  let(:params) do
    {
      'label' => 'auto pipeline1',
      'stages' => [
        {
          'label' => 'initial state',
          'displayOrder' => 0,
          'probability' => 0.5
        },
        {
          'label' => 'next state',
          'displayOrder' => 1,
          'probability' => 0.9
        }
      ]
    }
  end

  it 'should create, find, update and destroy' do
    pipeline = Hubspot::DealPipeline.create!(params)

    expect(pipeline.label).to eql 'auto pipeline1'
    expect(pipeline.stages.size).to eql 2
    expect(pipeline.stages.first['label']).to eql 'initial state'
    expect(pipeline.stages[1]['label']).to eql 'next state'

    pipeline.destroy!
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hubspot-ruby-0.5.0 spec/live/deal_pipeline_spec.rb
hubspot-ruby-0.4.0 spec/live/deal_pipeline_spec.rb
hubspot-ruby-0.3.0 spec/live/deal_pipeline_spec.rb