test/unit/zena/use/refactor_test.rb in zena-0.16.9 vs test/unit/zena/use/refactor_test.rb in zena-1.0.0.beta1
- old
+ new
@@ -1,20 +1,15 @@
require 'test_helper'
class RefactorTest < Zena::View::TestCase
- tests Zena::Use::Refactor::ViewMethods # fquote
-
- def _(k)
- k
+ def setup
+ login(:anon)
+ visiting(:status)
end
- def zen_path(obj, opts)
- "/#{opts[:lang]}/#{obj.zip}.html"
- end
-
def test_render_to_string
- assert_match 'stupid test 25', render_to_string(:inline=>'stupid <%= "test" %> <%= 5*5 %>')
+ assert_equal 'stupid test 25', render_to_string(:inline=>'stupid <%= "test" %> <%= 5*5 %>')
end
def test_fsize
assert_equal '29 Kb', fsize(29279)
assert_equal '502 Kb', fsize(513877)
@@ -23,15 +18,9 @@
assert_equal '2.35 Gb', fsize(2518908928)
end
def test_rnd
assert ((Time.now.to_i-1 <= rnd) && (rnd <= Time.now.to_i+2))
- end
-
- def test_change_lang
- assert_equal ({:overwrite_params=>{:prefix=>'io'}}), change_lang('io')
- login(:ant)
- assert_equal ({:overwrite_params=>{:lang=>'io'}}), change_lang('io')
end
def test_traductions
visitor.lang = 'en'
# we must initialize an url for url_rewriting in 'traductions'
\ No newline at end of file