Sha256: b546c63abe77e3bb5c133635f8d5a023ffce3a07843baab64b8a77aa840a21de

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 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_truthy
  @orders_result.length.should == 100
end

Then(/^I should receive an invalid cookie error$/) do
  @orders_result.failure?.should be_truthy
  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.1 features/step_definitions/search_more_orders_steps.rb