Sha256: 7642edff9ea0cd9da94748b781d88819c53af94f43ce037cb21f0151e12d0b0e
Contents?: true
Size: 896 Bytes
Versions: 2
Compression:
Stored size: 896 Bytes
Contents
require 'spec_helper' describe Alchemy::Admin::ContentsHelper do before(:each) do @element = FactoryGirl.create(:element, :name => 'article') end it "should render a dom id" do helper.content_dom_id(@element.content_by_type('EssenceText')).should match(/essence_text_\d{1,}/) end it "should render the content name" do helper.render_content_name(@element.content_by_type('EssenceText')).should == "Intro" end it "should render a link to add new content to element" do helper.stub!(:render_icon).and_return('') 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-2.2.rc13 | spec/helpers/admin/contents_helper_spec.rb |
alchemy_cms-2.2.rc11 | spec/helpers/admin/contents_helper_spec.rb |