Sha256: d64869f829c733729f106489a20c65578ff07e90efc487f5bdd2d4ae57090251

Contents?: true

Size: 787 Bytes

Versions: 4

Compression:

Stored size: 787 Bytes

Contents

require 'spec_helper'

describe Alchemy::Admin::ContentsHelper do

  before(:each) do
    @element = Factory(:element)
  end

  it "should render a dom id" do
    helper.content_dom_id(@element.contents.first).should match(/essence_text_\d{1,}/)
  end

  it "should render the content name" do
    helper.render_content_name(@element.contents.first).should == "Intro"
  end

  it "should render a link to add new content to element" do
    helper.render_new_content_link(@element).should match(/Alchemy.openWindow.+\/admin\/elements\/#{@element.id}\/contents\/new/m)
  end

  it "should render a link to create a content in element" do
    helper.render_create_content_link(@element).should match(/a.+href.*admin\/contents.+class.+button new_content_link.*data-method.+post/)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alchemy_cms-2.2.rc6 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.2.rc3 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.2.rc2 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.2.rc1 spec/helpers/admin/contents_helper_spec.rb