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_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'help/test/unit/ticket_test.rb') diff --git a/help/test/unit/ticket_test.rb b/help/test/unit/ticket_test.rb index fddd719..2dbd63c 100644 --- a/help/test/unit/ticket_test.rb +++ b/help/test/unit/ticket_test.rb @@ -41,7 +41,8 @@ class TicketTest < ActiveSupport::TestCase assert_not_nil t1.code assert_nil t1.created_by - t2 = Ticket.create :title => 'test title', :created_by => 4 + User.current = 4 + t2 = Ticket.create :title => 'test title' assert_nil t2.code assert_not_nil t2.created_by -- cgit v1.2.3 From c89610d1aad8500b4f7058c970bb07a60a55a5ce Mon Sep 17 00:00:00 2001 From: jessib Date: Wed, 3 Oct 2012 16:53:00 -0700 Subject: Some model/unit test tweaks --- help/test/unit/ticket_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'help/test/unit/ticket_test.rb') diff --git a/help/test/unit/ticket_test.rb b/help/test/unit/ticket_test.rb index 2dbd63c..c3a4759 100644 --- a/help/test/unit/ticket_test.rb +++ b/help/test/unit/ticket_test.rb @@ -14,6 +14,11 @@ class TicketTest < ActiveSupport::TestCase assert t.valid? assert_equal t.title, 'test title' + assert t.is_open + t.close + assert !t.is_open + t.reopen + assert t.is_open #user = LeapWebHelp::User.new(User.valid_attributes_hash) #user = LeapWebUsers::User.create -- cgit v1.2.3