3 class NoteCommentTest < ActiveSupport::TestCase
5 ok = %w[opened closed reopened commented hidden]
6 bad = %w[expropriated fubared]
9 note_comment = create(:note_comment)
10 note_comment.event = event
11 assert_predicate note_comment, :valid?, "#{event} is invalid, when it should be"
15 note_comment = create(:note_comment)
16 note_comment.event = event
17 assert_not note_comment.valid?, "#{event} is valid when it shouldn't be"
22 ok = %W[Name vergrößern foo\nbar
24 bad = ["foo\x00bar", "foo\x08bar", "foo\x1fbar", "foo\x7fbar",
25 "foo\ufffebar", "foo\uffffbar"]
28 note_comment = create(:note_comment)
29 note_comment.body = body
30 assert_predicate note_comment, :valid?, "#{body} is invalid, when it should be"
34 note_comment = create(:note_comment)
35 note_comment.body = body
36 assert_not note_comment.valid?, "#{body} is valid when it shouldn't be"