Sha256: 290124e3018dcfcadb23ae074c7e77d41be3787371671e415d5159a7ee77c7cc

Contents?: true

Size: 790 Bytes

Versions: 1

Compression:

Stored size: 790 Bytes

Contents

When(/^I search for second page$/) do
  VCR.use_cassette('sales_order_more') do
    @orders_result = ShipCompliant::SearchMoreSalesOrders.paging_cookie('33d2c6d7-212c-46fd-9712-d4a5ca1f4f2f')
  end
end

When(/^I search with invalid paging cookie$/) do
  VCR.use_cassette('search_more_orders_invalid_cookie') do
    @orders_result = ShipCompliant::SearchMoreSalesOrders.paging_cookie('invalid-cookie')
  end
end

Then(/^I should have orders$/) do
  @orders_result.success?.should be_true
  @orders_result.length.should == 100
end

Then(/^I should receive an invalid cookie error$/) do
  @orders_result.failure?.should be_true
  error = @orders_result.errors.first

  error.message.should == 'PagingCookie was not found [00000000-0000-0000-0000-000000000000].'
  error.code.should == 236
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ship_compliant-0.2.0 features/step_definitions/search_more_orders_steps.rb