Sha256: 03b72a4b685312ff34e3c7cfbab04aa217f7ab7e2d08ec7c4bb77ffc717058f0
Contents?: true
Size: 973 Bytes
Versions: 27
Compression:
Stored size: 973 Bytes
Contents
require 'spec_helper' describe Alchemy::Admin::ContentsHelper do before(:each) do @element = FactoryGirl.create(:element, :name => 'article', :create_contents_after_create => true) 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(/a.+href.*admin\/elements\/#{@element.id}\/contents\/new/m) end it "should render a link to create a content in element" do helper.stub!(:render_icon).and_return('') helper.render_create_content_link(@element, 'headline').should match(/a.+href.*admin\/contents.+class.+new_content_link.*data-method.+post/) end end
Version data entries
27 entries across 27 versions & 1 rubygems