0
require File.dirname(__FILE__) + '/../test_helper'
0
+['', '/blog'].each do |root|
0
+ context "Article Drop with relative root = #{root.inspect}" do
0
+ fixtures :sites, :sections, :contents, :assigned_sections, :users, :tags, :taggings, :assigned_assets, :assets
0
+ @context = mock_context('site' => sites(:first).to_liquid)
0
+ @article = contents(:welcome).to_liquid(:mode => :single)
0
+ @article.context = @context
0
+ Mephisto::Liquid::UrlMethods.stubs(:relative_url_root).returns(root)
0
+ specify "should show article url" do
0
+ t = Time.now.utc - 3.days
0
+ assert_equal "#{root}/#{t.year}/#{t.month}/#{t.day}/welcome-to-mephisto", @article.url
0
+ specify "should show comments feed url" do
0
+ t = Time.now.utc - 3.days
0
+ assert_equal "#{root}/#{t.year}/#{t.month}/#{t.day}/welcome-to-mephisto/comments.xml", @article.comments_feed_url
0
+ specify "should change feed url" do
0
+ t = Time.now.utc - 3.days
0
+ assert_equal "#{root}/#{t.year}/#{t.month}/#{t.day}/welcome-to-mephisto/changes.xml", @article.changes_feed_url
0
context "Article Drop" do
0
fixtures :sites, :sections, :contents, :assigned_sections, :users, :tags, :taggings, :assigned_assets, :assets
0
a = contents(:welcome).to_liquid
0
assert_equal "<p>body</p>", a.send(:body_for_mode, :single)
0
assert_equal '<p>body</p>', a.send(:body_for_mode, :list)
0
- specify "should show article url" do
0
- t = Time.now.utc - 3.days
0
- assert_equal "/#{t.year}/#{t.month}/#{t.day}/welcome-to-mephisto", @article.url
0
- specify "should show comments feed url" do
0
- t = Time.now.utc - 3.days
0
- assert_equal "/#{t.year}/#{t.month}/#{t.day}/welcome-to-mephisto/comments.xml", @article.comments_feed_url
0
- specify "should change feed url" do
0
- t = Time.now.utc - 3.days
0
- assert_equal "/#{t.year}/#{t.month}/#{t.day}/welcome-to-mephisto/changes.xml", @article.changes_feed_url
0
specify "should show taggable tags" do
Comments
No one has commented yet.