Sha256: 677744775ef003518dc99e9e2176a599d52ad1d970d9f50911f639fd2e457652

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

require 'spec_helper'

module GoTransverseTractApi

  RSpec.describe Product::Product do
    before(:each) { http_auth }

    context ".find_all" do
      it "returns all products" do
        response = described_class.find_all
        num_of_products = response.css('products').children.count
        expect(num_of_products).to be > 1
      end
    end

    context ".find_by_eid" do
      it "returns a product for the given eid" do
        response = described_class.find_by_eid(50)
        data = Hash.from_xml(response.to_s)
        expect(data['products']['product']['eid']).to eq('50')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gotransverse-tract-api-0.2.3 spec/gotransverse-tract-api/product/product_spec.rb