Small improvements.
This commit is contained in:
parent
c403a5e82c
commit
1d162c5da3
2 changed files with 72 additions and 81 deletions
|
@ -37,7 +37,7 @@ class SettingTest < TestCase
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'wait',
|
:execute => 'wait',
|
||||||
:value => 4,
|
:value => 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
|
@ -51,10 +51,6 @@ class SettingTest < TestCase
|
||||||
:value => 'no',
|
:value => 'no',
|
||||||
:match_result => false,
|
:match_result => false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
:execute => 'wait',
|
|
||||||
:value => 1,
|
|
||||||
},
|
|
||||||
|
|
||||||
# set no
|
# set no
|
||||||
{
|
{
|
||||||
|
@ -68,7 +64,7 @@ class SettingTest < TestCase
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'wait',
|
:execute => 'wait',
|
||||||
:value => 2,
|
:value => 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
|
@ -100,7 +96,7 @@ class SettingTest < TestCase
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'wait',
|
:execute => 'wait',
|
||||||
:value => 2,
|
:value => 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
|
@ -132,7 +128,7 @@ class SettingTest < TestCase
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'wait',
|
:execute => 'wait',
|
||||||
:value => 2,
|
:value => 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
|
|
|
@ -3,16 +3,6 @@ require 'test_helper'
|
||||||
|
|
||||||
class EmailProcessTest < ActiveSupport::TestCase
|
class EmailProcessTest < ActiveSupport::TestCase
|
||||||
test 'process simple' do
|
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 = [
|
files = [
|
||||||
{
|
{
|
||||||
:data => 'From: me@example.com
|
:data => 'From: me@example.com
|
||||||
|
@ -1942,8 +1932,13 @@ Some Text',
|
||||||
end
|
end
|
||||||
|
|
||||||
test 'process with postmaster filter' do
|
test 'process with postmaster filter' do
|
||||||
group = Group.create_if_not_exists(
|
group1 = Group.create_if_not_exists(
|
||||||
:name => 'Test Group',
|
:name => 'Test Group1',
|
||||||
|
:created_by_id => 1,
|
||||||
|
:updated_by_id => 1,
|
||||||
|
)
|
||||||
|
group2 = Group.create_if_not_exists(
|
||||||
|
:name => 'Test Group2',
|
||||||
:created_by_id => 1,
|
:created_by_id => 1,
|
||||||
:updated_by_id => 1,
|
:updated_by_id => 1,
|
||||||
)
|
)
|
||||||
|
@ -1967,7 +1962,7 @@ Some Text',
|
||||||
:from => 'me@example.com',
|
:from => 'me@example.com',
|
||||||
},
|
},
|
||||||
:perform => {
|
:perform => {
|
||||||
'X-Zammad-Ticket-group_id' => group.id,
|
'X-Zammad-Ticket-group_id' => group1.id,
|
||||||
'x-Zammad-Article-Internal' => true,
|
'x-Zammad-Article-Internal' => true,
|
||||||
},
|
},
|
||||||
:channel => 'email',
|
:channel => 'email',
|
||||||
|
@ -1981,7 +1976,7 @@ Some Text',
|
||||||
'x-any-recipient' => 'any@example.com',
|
'x-any-recipient' => 'any@example.com',
|
||||||
},
|
},
|
||||||
:perform => {
|
:perform => {
|
||||||
'X-Zammad-Ticket-group_id' => 2,
|
'X-Zammad-Ticket-group_id' => group2.id,
|
||||||
'x-Zammad-Article-Internal' => true,
|
'x-Zammad-Article-Internal' => true,
|
||||||
},
|
},
|
||||||
:channel => 'email',
|
:channel => 'email',
|
||||||
|
@ -2000,7 +1995,7 @@ Some Text',
|
||||||
:success => true,
|
:success => true,
|
||||||
:result => {
|
:result => {
|
||||||
0 => {
|
0 => {
|
||||||
:group => group.name,
|
:group => group1.name,
|
||||||
:priority => '2 normal',
|
:priority => '2 normal',
|
||||||
:title => 'some subject',
|
:title => 'some subject',
|
||||||
},
|
},
|
||||||
|
@ -2022,7 +2017,7 @@ Some Text',
|
||||||
:success => true,
|
:success => true,
|
||||||
:result => {
|
:result => {
|
||||||
0 => {
|
0 => {
|
||||||
:group => 'Twitter',
|
:group => group2.name,
|
||||||
:priority => '2 normal',
|
:priority => '2 normal',
|
||||||
:title => 'some subject',
|
:title => 'some subject',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue