1 # -*- coding: utf-8 -*-
4 class NoteCommentTest < ActiveSupport::TestCase
5 fixtures :users, :notes, :note_comments
8 ok = [ "Name", "vergrößern", "foo\x0abar",
9 "ルシステムにも対応します", "輕觸搖晃的遊戲", ]
10 bad = [ "foo\x00bar", "foo\x08bar", "foo\x1fbar", "foo\x7fbar",
11 "foo\ufffebar", "foo\uffffbar" ]
14 note_comment = note_comments(:t1)
15 note_comment.body = body
16 assert note_comment.valid?, "#{body} is invalid, when it should be"
20 note_comment = note_comments(:t1)
21 note_comment.body = body
22 assert !note_comment.valid?, "#{body} is valid when it shouldn't be"