Sha256: aac18db55e22b624aa610a06afabf73cb008af88120390f2f70275440081ddc9

Contents?: true

Size: 769 Bytes

Versions: 21

Compression:

Stored size: 769 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

21 entries across 21 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.11 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.9.1 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.9 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.8.1 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.8 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.7 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.6 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.5 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.4 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.3 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.2 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.1 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.rc6 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.rc5 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.rc4 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.rc3 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.rc2 spec/helpers/admin/contents_helper_spec.rb
alchemy_cms-2.1.beta6 spec/helpers/admin/contents_helper_spec.rb