summaryrefslogtreecommitdiff
path: root/help/test/unit/ticket_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-05 13:00:52 +0200
committerAzul <azul@leap.se>2012-10-05 13:00:52 +0200
commit6cf3dacd4a4d0f30a41c6a75658443ce6192e750 (patch)
tree2eaea784e97de9652ce8c39ab2b4db9e32de5d1e /help/test/unit/ticket_test.rb
parent5fe296eb9f9b216e05921ac0c41f5defc1cc2054 (diff)
parentc89610d1aad8500b4f7058c970bb07a60a55a5ce (diff)
Merge remote-tracking branch 'origin/master' into develop
Conflicts: users/app/controllers/sessions_controller.rb
Diffstat (limited to 'help/test/unit/ticket_test.rb')
-rw-r--r--help/test/unit/ticket_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/help/test/unit/ticket_test.rb b/help/test/unit/ticket_test.rb
index fddd719..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
@@ -41,7 +46,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