From 5bc3eae400754dda90a45d6953a02a069a1c0285 Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 2 Oct 2012 15:29:28 -0700 Subject: Some more tweaks to help ticket models. Still want to tweak current_user access from users engine. --- help/test/unit/ticket_comment_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'help/test/unit/ticket_comment_test.rb') diff --git a/help/test/unit/ticket_comment_test.rb b/help/test/unit/ticket_comment_test.rb index 37e6e67..ba6120b 100644 --- a/help/test/unit/ticket_comment_test.rb +++ b/help/test/unit/ticket_comment_test.rb @@ -25,6 +25,13 @@ class TicketCommentTest < ActiveSupport::TestCase #tc.ticket = Ticket.find_by_title("test title") #tc.ticket.title end + + test "create authenticated comment" do + User.current = 4 + comment2 = TicketComment.new :body => "help my email is broken!" + comment2.save + assert_not_nil comment2.posted_by + end test "add comments" do testticket = Ticket.create :title => "testing" -- cgit v1.2.3