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-0.11.2 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.11.1 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.11.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.10.5 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.10.4 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.10.3 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.10.2 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.10.1 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.10.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.9.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.8.4 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.8.3 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.8.2 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.8.1 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.8.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.7.1 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.7.0 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.6.7 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.6.6 spec/units/dugway/liquid/drops/category_drop_spec.rb
dugway-0.6.5 spec/units/dugway/liquid/drops/category_drop_spec.rb