Small improvements.

This commit is contained in:
Martin Edenhofer 2014-12-03 08:13:35 +01:00
parent c403a5e82c
commit 1d162c5da3
2 changed files with 72 additions and 81 deletions

View file

@ -37,7 +37,7 @@ class SettingTest < TestCase
},
{
:execute => 'wait',
:value => 4,
:value => 6,
},
{
:execute => 'match',
@ -51,10 +51,6 @@ class SettingTest < TestCase
:value => 'no',
:match_result => false,
},
{
:execute => 'wait',
:value => 1,
},
# set no
{
@ -68,7 +64,7 @@ class SettingTest < TestCase
},
{
:execute => 'wait',
:value => 2,
:value => 6,
},
{
:execute => 'match',
@ -100,7 +96,7 @@ class SettingTest < TestCase
},
{
:execute => 'wait',
:value => 2,
:value => 6,
},
{
:execute => 'match',
@ -132,7 +128,7 @@ class SettingTest < TestCase
},
{
:execute => 'wait',
:value => 2,
:value => 6,
},
{
:execute => 'match',

View file

@ -3,16 +3,6 @@ require 'test_helper'
class EmailProcessTest < ActiveSupport::TestCase
test 'process simple' do
# needed to check correct behavior
Group.create_if_not_exists(
:id => 2,
:name => 'Twitter',
:note => 'All Tweets.',
:updated_by_id => 1,
:created_by_id => 1
)
files = [
{
:data => 'From: me@example.com
@ -1942,8 +1932,13 @@ Some Text',
end
test 'process with postmaster filter' do
group = Group.create_if_not_exists(
:name => 'Test Group',
group1 = Group.create_if_not_exists(
:name => 'Test Group1',
:created_by_id => 1,
:updated_by_id => 1,
)
group2 = Group.create_if_not_exists(
:name => 'Test Group2',
:created_by_id => 1,
:updated_by_id => 1,
)
@ -1967,7 +1962,7 @@ Some Text',
:from => 'me@example.com',
},
:perform => {
'X-Zammad-Ticket-group_id' => group.id,
'X-Zammad-Ticket-group_id' => group1.id,
'x-Zammad-Article-Internal' => true,
},
:channel => 'email',
@ -1981,7 +1976,7 @@ Some Text',
'x-any-recipient' => 'any@example.com',
},
:perform => {
'X-Zammad-Ticket-group_id' => 2,
'X-Zammad-Ticket-group_id' => group2.id,
'x-Zammad-Article-Internal' => true,
},
:channel => 'email',
@ -2000,7 +1995,7 @@ Some Text',
:success => true,
:result => {
0 => {
:group => group.name,
:group => group1.name,
:priority => '2 normal',
:title => 'some subject',
},
@ -2022,7 +2017,7 @@ Some Text',
:success => true,
:result => {
0 => {
:group => 'Twitter',
:group => group2.name,
:priority => '2 normal',
:title => 'some subject',
},