Sha256: a170b2cdf0c082322bb0b42e51c08efbd5b850e87728bcdb0d10253f4563ccd4

Contents?: true

Size: 702 Bytes

Versions: 33

Compression:

Stored size: 702 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
        data = described_class.find_all
        expect(data.count).to be >= 0
      end
    end

    context ".find_by_eid" do
      it "returns a product for the given eid" do
        data = described_class.find_by_eid(0)
        expect(data['eid']).to be_nil 
      end
    end

    context ".find_by_name" do
      it "returns a product for the given name" do
        data = described_class.find_by_name('Postcards 1st Class', {query_scope: 'DEEP'})
        expect(data).to_not be_nil 
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
gotransverse-tract-api-0.24.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.23.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.22.1 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.22.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.21.1 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.21.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.20.3 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.20.2 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.20.1 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.20.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.19.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.18.3 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.18.2 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.18.1 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.18.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.17.2 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.17.1 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.17.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.16.0 spec/gotransverse-tract-api/product/product_spec.rb
gotransverse-tract-api-0.15.0 spec/gotransverse-tract-api/product/product_spec.rb