From 754a46db78d44b7248576a348b840d58e34695f8 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 7 Jul 2016 11:37:43 +0200 Subject: [PATCH] Improved tests. --- test/integration/email_helper_test.rb | 1 + test/integration/report_test.rb | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/integration/email_helper_test.rb b/test/integration/email_helper_test.rb index 1b0da03d3..683ef8bc0 100644 --- a/test/integration/email_helper_test.rb +++ b/test/integration/email_helper_test.rb @@ -457,6 +457,7 @@ class EmailHelperTest < ActiveSupport::TestCase email: mailbox_user, password: mailbox_password, ) + assert_equal(nil, result[:reason]) assert_equal('ok', result[:result]) assert_equal('pop.gmail.com', result[:setting][:inbound][:options][:host]) assert_equal('smtp.gmail.com', result[:setting][:outbound][:options][:host]) diff --git a/test/integration/report_test.rb b/test/integration/report_test.rb index 5e020d978..9709ab6fe 100644 --- a/test/integration/report_test.rb +++ b/test/integration/report_test.rb @@ -81,8 +81,8 @@ class ReportTest < ActiveSupport::TestCase customer_id: 2, state: Ticket::State.lookup(name: 'new'), priority: Ticket::Priority.lookup(name: '2 normal'), - created_at: '2015-10-28 09:30:00 UTC', - updated_at: '2015-10-28 09:30:00 UTC', + created_at: '2015-10-28 09:30:01 UTC', + updated_at: '2015-10-28 09:30:01 UTC', updated_by_id: 1, created_by_id: 1, ) @@ -96,8 +96,8 @@ class ReportTest < ActiveSupport::TestCase internal: false, sender: Ticket::Article::Sender.where(name: 'Customer').first, type: Ticket::Article::Type.where(name: 'email').first, - created_at: '2015-10-28 09:30:00 UTC', - updated_at: '2015-10-28 09:30:00 UTC', + created_at: '2015-10-28 09:30:01 UTC', + updated_at: '2015-10-28 09:30:01 UTC', updated_by_id: 1, created_by_id: 1, ) @@ -746,6 +746,7 @@ class ReportTest < ActiveSupport::TestCase params: { field: 'created_at' }, ) assert(result) + assert_equal(ticket7.id, result[:ticket_ids][0].to_i) assert_equal(ticket6.id, result[:ticket_ids][1].to_i) assert_equal(ticket5.id, result[:ticket_ids][2].to_i)