stubbed in blank controllers/helpers/functional tests

This commit is contained in:
albert
2010-03-10 18:21:43 -05:00
parent 836b59b1cd
commit ac98d7db37
137 changed files with 1349 additions and 58 deletions

View File

@@ -0,0 +1,2 @@
module Admin::UsersHelper
end

View File

@@ -0,0 +1,2 @@
module AdvertisementsHelper
end

View File

@@ -1,2 +1,62 @@
module ApplicationHelper
def nav_link_to(text, options, html_options = nil)
if options[:controller] == params[:controller] || (%w(tag_alias tag_implication).include?(params[:controller]) && options[:controller] == "tag")
klass = "current-page"
else
klass = nil
end
%{<li class="#{klass}">} + fast_link_to(text, options, html_options) + "</li>"
end
def format_text(text, options = {})
DText.parse(text)
end
def id_to_color(id)
r = id % 255
g = (id >> 8) % 255
b = (id >> 16) % 255
"rgb(#{r}, #{g}, #{b})"
end
def tag_header(tags)
unless tags.blank?
'/' + Tag.scan_query(tags).map {|t| link_to(h(t.tr("_", " ")), posts_path(:tags => t)}.join("+")
end
end
def compact_time(time)
if time > Time.now.beginning_of_day
time.strftime("%H:%M")
elsif time > Time.now.beginning_of_year
time.strftime("%b %e")
else
time.strftime("%b %e, %Y")
end
end
def print_preview(post, options = {})
unless Danbooru.config.can_see_post?(post, @current_user)
return ""
end
options = {:blacklist => true}.merge(options)
blacklist = options[:blacklist] ? "blacklisted" : ""
width, height = post.preview_dimensions
image_id = options[:image_id]
image_id = %{id="#{h(image_id)}"} if image_id
title = "#{h(post.cached_tags)} rating:#{post.rating} score:#{post.score} uploader:#{h(post.uploader_name)}"
content_for(:blacklist) {"Post.register(#{post.to_json});\n"} if options[:blacklist]
%{
<span class="thumb #{blacklist}" id="p#{post.id}">
<a href="/posts/#{post.id}">
<img #{image_id} class="preview #{'flagged' if post.is_flagged?} #{'pending' if post.is_pending?}" src="#{post.preview_url}" title="#{title}" alt="#{title}" width="#{width}" height="#{height}">
</a>
</span>
}
end
end

View File

@@ -0,0 +1,2 @@
module ArtistVersionsHelper
end

View File

@@ -0,0 +1,2 @@
module ArtistsHelper
end

View File

@@ -0,0 +1,2 @@
module BansHelper
end

View File

@@ -0,0 +1,2 @@
module CommentVotesHelper
end

View File

@@ -0,0 +1,2 @@
module CommentsHelper
end

View File

@@ -0,0 +1,2 @@
module DmailsHelper
end

View File

@@ -0,0 +1,2 @@
module FavoritesHelper
end

View File

@@ -0,0 +1,2 @@
module ForumPostsHelper
end

View File

@@ -0,0 +1,2 @@
module ForumTopicsHelper
end

View File

@@ -0,0 +1,2 @@
module JanitorTrialsHelper
end

View File

@@ -0,0 +1,2 @@
module JobsHelper
end

View File

@@ -0,0 +1,2 @@
module NotesHelper
end

View File

@@ -0,0 +1,2 @@
module PoolVersionsHelper
end

View File

@@ -0,0 +1,2 @@
module PoolsHelper
end

View File

@@ -0,0 +1,2 @@
module PostHelper
end

View File

@@ -0,0 +1,2 @@
module PostModerationDetailsHelper
end

View File

@@ -0,0 +1,2 @@
module PostVersionsHelper
end

View File

@@ -0,0 +1,2 @@
module PostVotesHelper
end

View File

@@ -0,0 +1,2 @@
module SessionsHelper
end

View File

@@ -0,0 +1,2 @@
module TagAliasesHelper
end

View File

@@ -0,0 +1,2 @@
module TagImplicationsHelper
end

View File

@@ -0,0 +1,2 @@
module TagSubscriptionsHelper
end

View File

@@ -0,0 +1,2 @@
module TagsHelper
end

View File

@@ -0,0 +1,2 @@
module UnapprovalsHelper
end

View File

@@ -0,0 +1,2 @@
module UploadsHelper
end

View File

@@ -0,0 +1,2 @@
module UserFeedbackHelper
end

View File

@@ -0,0 +1,2 @@
module UsersHelper
end

View File

@@ -0,0 +1,2 @@
module WikiPageVersionsHelper
end

View File

@@ -0,0 +1,2 @@
module WikiPagesHelper
end