Sha256: 01e8bd74319c9f9d7b4c15223cb53ac54adb82634b5d9f5fb6e195522a2a774d
Contents?: true
Size: 941 Bytes
Versions: 10
Compression:
Stored size: 941 Bytes
Contents
require 'spec_helper' describe Alchemy::Admin::ContentsHelper do let(:element) { FactoryGirl.create(:element, name: 'article', create_contents_after_create: true) } 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
10 entries across 10 versions & 1 rubygems