From f11736019d833651cd49a342bca69d1eef64a4c5 Mon Sep 17 00:00:00 2001 From: Junior Silva Date: Tue, 14 Jan 2014 17:25:24 -0300 Subject: [PATCH] article-version: implementing testing for feature AI2822 --- app/controllers/public/content_viewer_controller.rb | 8 +++++--- test/functional/content_viewer_controller_test.rb | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index b036eb6..001b2ce 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -120,6 +120,10 @@ class ContentViewerController < ApplicationController end end + def self.versioning_articles(article1, article2) + Diffy::Diff.new('article1', 'article2', :source => 'files').to_s(:html) + end + protected def per_page @@ -152,8 +156,6 @@ class ContentViewerController < ApplicationController end - def versioning_articles(article1, article2) - Diffy::Diff.new('article1', 'article2', :source => 'files').to_s(:html) - end + diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 55a066b..1af7e05 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -1195,7 +1195,7 @@ class ContentViewerControllerTest < ActionController::TestCase end should 'display differences between article versions' do - Article.versioning_articles('/files/test.txt','/files/test.txt') + ContentViewerController.versioning_articles('/files/test.txt','/files/test.txt') end should 'not display comments marked as spam' do -- libgit2 0.21.2