Sha256: da0e9e4ccc4c497e7dd02cefb90d55ccd143674f16519df916089f26d0ed4e4e

Contents?: true

Size: 1.7 KB

Versions: 33

Compression:

Stored size: 1.7 KB

Contents

require 'spec_helper'

describe Dugway::Drops::PageDrop do
  let(:page) { 
    page = Dugway.store.page('about-us')
    Dugway::Drops::PageDrop.new(page).tap { |drop|
      drop.context = Liquid::Context.new({}, {}, {
        :request => Rack::Request.new({'PATH_INFO' => '/about-us', 'rack.url_scheme' => 'http', 'HTTP_HOST' => 'test.bigcartel.com', 'SERVER_PORT' => 80})
      })
    }
  }

  describe "#id" do
    it "should return the page's id" do
      page.id.should == 95821979
    end
  end

  describe "#name" do
    it "should return the page's name" do
      page.name.should == 'About Us'
    end
  end

  describe "#content" do
    it "should return the page's content" do
      page.content.should == "<p>We're really cool!</p>"
    end
  end

  describe "#category" do
    it "should return the page's category" do
      page.category.should == 'custom'
    end
  end

  describe "#permalink" do
    it "should return the page's permalink" do
      page.permalink.should == 'about-us'
    end
  end

  describe "#url" do
    it "should return the page's url" do
      page.url.should == '/about-us'
    end
  end

  describe "#full_url" do
    it "should return the page's full_url" do
      page.full_url.should == 'http://test.bigcartel.com/about-us'
    end
  end

  describe "#full_path" do
    it "should return the page's full_path" do
      page.full_path.should == '/about-us'
    end
  end

  describe "#meta_description" do
    it "should return the page's meta_description" do
      page.meta_description.should == 'Example meta description'
    end
  end

  describe "#meta_keywords" do
    it "should return the page's meta_keywords" do
      page.meta_keywords.should == 'example, key, words'
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

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