Sha256: 4e020a41caf66cadd2b40b9958020000d3d02de6da5f3d90c6b3a2d7b28e4bd2

Contents?: true

Size: 553 Bytes

Versions: 11

Compression:

Stored size: 553 Bytes

Contents

require 'spec_helper'
describe Seko::Product do

  let(:product_hash)  { { upc: 123456, description: "A Test Product" } }

  before do
    Seko.configure(configuration)
  end

  describe '.supplier' do
    it 'reads supplier deatils from config' do
      expect(Seko.config).to eq(configuration)
    end
  end

  describe '.format' do
    it 'formats a simple product hash into a fully formed JSON ready hash' do
      expected_result = fixture(:product_submit)
      expect(Seko::Product.format(product_hash)).to eq(expected_result)
    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
seko-0.0.11 spec/lib/product_spec.rb
seko-0.0.10 spec/lib/product_spec.rb
seko-0.0.9 spec/lib/product_spec.rb
seko-0.0.8 spec/lib/product_spec.rb
seko-0.0.7 spec/lib/product_spec.rb
seko-0.0.6 spec/lib/product_spec.rb
seko-0.0.5 spec/lib/product_spec.rb
seko-0.0.4 spec/lib/product_spec.rb
seko-0.0.3 spec/lib/product_spec.rb
seko-0.0.2 spec/lib/product_spec.rb
seko-0.0.1 spec/lib/product_spec.rb