2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-22 09:57:31 +00:00
moebooru/test/models/dtext_test.rb

17 lines
348 B
Ruby
Raw Permalink Normal View History

require "test_helper"
require_relative "./dtext/helper"
2014-12-05 11:19:35 +09:00
describe DText do
tests = DTextHelper.find_test
2014-12-05 11:19:35 +09:00
tests.each do |t|
match = t.gsub /\.txt$/, ".html"
it t do
assert_equal DTextHelper.h(match), DTextHelper.p(DTextHelper.r(t))
2014-12-05 11:19:35 +09:00
end
end
2014-12-05 23:54:08 +09:00
it "does not explode on nil" do
assert_equal "", DTextHelper.p(nil)
2014-12-05 23:54:08 +09:00
end
end