summaryrefslogtreecommitdiff
path: root/help/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'help/test/unit')
-rw-r--r--help/test/unit/account_extension_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/help/test/unit/account_extension_test.rb b/help/test/unit/account_extension_test.rb
new file mode 100644
index 0000000..aba162c
--- /dev/null
+++ b/help/test/unit/account_extension_test.rb
@@ -0,0 +1,12 @@
+require 'test_helper'
+
+class AccountExtensionTest < ActiveSupport::TestCase
+
+ test "destroying an account triggers ticket destruction" do
+ t = FactoryGirl.create :ticket_with_creator
+ u = t.created_by_user
+ Account.new(u).destroy
+ assert_equal nil, Ticket.find(t.id)
+ end
+
+end