spec/helpers/admin/node_helper_spec.rb in radiant-0.8.0 vs spec/helpers/admin/node_helper_spec.rb in radiant-0.8.1
- old
+ new
@@ -70,9 +70,15 @@
assigns[:current_node] = @page
@page.should_receive(:title).and_return("Title")
helper.node_title.should == %{<span class="title">Title</span>}
end
+ it "should render the title of the current node with HTML entities escaped" do
+ assigns[:current_node] = @page
+ @page.should_receive(:title).and_return("Ham & Cheese")
+ helper.node_title.should == %{<span class="title">Ham & Cheese</span>}
+ end
+
it "should render the page type if it's not Page" do
assigns[:current_node] = @page
@class = mock("Class")
@page.should_receive(:class).and_return(@class)
@class.should_receive(:display_name).and_return("Special")
\ No newline at end of file