Sha256: 966b46b15a3c152f799483177f9d594cb6132ccb4c65589040da3fa60e901980

Contents?: true

Size: 1.4 KB

Versions: 7

Compression:

Stored size: 1.4 KB

Contents

require File.expand_path("../../spec_helper", __FILE__)

describe ArchiveMonthIndexPage do
  dataset :archive
  
  before :each do
    @page = pages(:month_index)
  end
  
  its(:allowed_children){ should == [] }
  
  it_should_behave_like "Archive index page"
  
  it "should render the <r:archive:children:each /> tag" do
    @page.should render('<r:archive:children:each><r:slug /> </r:archive:children:each>').as('article-y ').on('/archive/2001/02/')
    @page.should render('<r:archive:children:each><r:slug /> </r:archive:children:each>').as('article-y ').on('/archive/2001/02')
  end
  
  it "should render the <r:title /> tag with interpolated date" do
    @page.should render('<r:title />').as('June 2000 Archive').on('/archive/2000/06/')
  end

  it "should render the <r:breadcrumb /> tag with interpolated date" do
    @page.should render('<r:breadcrumb />').as('June 2000 Archive').on('/archive/2000/06/')
  end

  it "should render the <r:path /> tag with interpolated date" do
    @page.should render('<r:path />').as('/archive/2000/06/').on('/archive/2000/06')
  end

  it "should properly render the <r:path /> tag of an archive child with interpolated date" do
    @page.should render('<r:archive:children:each><r:path /> </r:archive:children:each>').as('/archive/2000/01/01/article-z/ /archive/2000/01/02/early-post/ /archive/2000/01/03/z-post/ /archive/2000/01/04/a-post/ ').on('/archive/2000/01/')
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/radiant-archive-extension-1.0.7/spec/models/archive_month_index_page_spec.rb
radiant-archive-extension-1.0.7 spec/models/archive_month_index_page_spec.rb
radiant-archive-extension-1.0.6 spec/models/archive_month_index_page_spec.rb
radiant-archive-extension-1.0.5 spec/models/archive_month_index_page_spec.rb
radiant-archive-extension-1.0.4 spec/models/archive_month_index_page_spec.rb
radiant-archive-extension-1.0.3 spec/models/archive_month_index_page_spec.rb
radiant-archive-extension-1.0.2 spec/models/archive_month_index_page_spec.rb