Sha256: 1707b24a402dee553fe74d3e6cf3f7397163c3b06ba98557aa1489713381ef16

Contents?: true

Size: 731 Bytes

Versions: 12

Compression:

Stored size: 731 Bytes

Contents

require 'spec_helper'

include AlchemyHelper

describe ContentsHelper do

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

  it "should render a dom id" do
		content_dom_id(@element.contents.first).should == "essence_text_1"
	end

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

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

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

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-2.0.6.1 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.5 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.4 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.3.1 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.1.beta1 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.3 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.2 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.1 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.rc6 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.rc5 spec/helpers/contents_helper_spec.rb
alchemy_cms-2.0.rc4 spec/helpers/contents_helper_spec.rb