Sha256: 343bfab68541f22d110dd9ed4c7009c972b0ff7cda4cbbe756e5cfbb5cbe17b1

Contents?: true

Size: 961 Bytes

Versions: 50

Compression:

Stored size: 961 Bytes

Contents

require 'spec_helper'

describe Dugway::Drops::CategoryDrop do
  let(:category) { Dugway::Drops::CategoryDrop.new(Dugway.store.categories.last) }

  describe "#id" do
    it "should return the category's id" do
      category.id.should == 4615193
    end
  end

  describe "#name" do
    it "should return the category's name" do
      category.name.should == 'Tees'
    end
  end

  describe "#permalink" do
    it "should return the category's permalink" do
      category.permalink.should == 'tees'
    end
  end

  describe "#url" do
    it "should return the category's url" do
      category.url.should == '/category/tees'
    end
  end

  describe "#products" do
    it "should return the category's products" do
      products = category.products
      products.should be_an_instance_of(Array)

      product = products.first
      product.should be_an_instance_of(Dugway::Drops::ProductDrop)
      product.name.should == 'My Product'
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
dugway-1.0.14 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.13 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.12 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.10 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.9 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.8 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.7 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.6 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.5 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.4 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.3 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.2 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.1 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-1.0.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.12.3 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.12.2 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.12.1 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.12.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.11.4 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.11.3 spec/units/dugway/liquid/drops/category_drop_spec.rb