Improved test.

This commit is contained in:
Martin Edenhofer 2018-10-16 16:37:46 +02:00
parent d0bafea5e7
commit 23f499dffc
2 changed files with 11 additions and 11 deletions

View file

@ -4,7 +4,7 @@ class EmailProcessOutOfOfficeTest < ActiveSupport::TestCase
test 'process with out of office check - ms' do test 'process with out of office check - ms' do
ticket = Ticket.create( ticket = Ticket.create!(
title: 'ooo check - ms', title: 'ooo check - ms',
group: Group.lookup(name: 'Users'), group: Group.lookup(name: 'Users'),
customer_id: 2, customer_id: 2,
@ -13,7 +13,7 @@ class EmailProcessOutOfOfficeTest < ActiveSupport::TestCase
updated_by_id: 1, updated_by_id: 1,
created_by_id: 1, created_by_id: 1,
) )
article = Ticket::Article.create( article = Ticket::Article.create!(
ticket_id: ticket.id, ticket_id: ticket.id,
from: 'some_sender@example.com', from: 'some_sender@example.com',
to: 'some_recipient@example.com', to: 'some_recipient@example.com',
@ -90,7 +90,7 @@ Some Text"
test 'process with out of office check - zimbra' do test 'process with out of office check - zimbra' do
ticket = Ticket.create( ticket = Ticket.create!(
title: 'ooo check - zimbra', title: 'ooo check - zimbra',
group: Group.lookup(name: 'Users'), group: Group.lookup(name: 'Users'),
customer_id: 2, customer_id: 2,
@ -99,7 +99,7 @@ Some Text"
updated_by_id: 1, updated_by_id: 1,
created_by_id: 1, created_by_id: 1,
) )
article = Ticket::Article.create( article = Ticket::Article.create!(
ticket_id: ticket.id, ticket_id: ticket.id,
from: 'some_sender@example.com', from: 'some_sender@example.com',
to: 'some_recipient@example.com', to: 'some_recipient@example.com',
@ -168,7 +168,7 @@ Some Text"
test 'process with out of office check - cloud' do test 'process with out of office check - cloud' do
ticket = Ticket.create( ticket = Ticket.create!(
title: 'ooo check - cloud', title: 'ooo check - cloud',
group: Group.lookup(name: 'Users'), group: Group.lookup(name: 'Users'),
customer_id: 2, customer_id: 2,
@ -177,7 +177,7 @@ Some Text"
updated_by_id: 1, updated_by_id: 1,
created_by_id: 1, created_by_id: 1,
) )
article = Ticket::Article.create( article = Ticket::Article.create!(
ticket_id: ticket.id, ticket_id: ticket.id,
from: 'some_sender@example.com', from: 'some_sender@example.com',
to: 'some_recipient@example.com', to: 'some_recipient@example.com',
@ -241,7 +241,7 @@ Some Text"
test 'process with out of office check - gmail' do test 'process with out of office check - gmail' do
ticket = Ticket.create( ticket = Ticket.create!(
title: 'ooo check - gmail', title: 'ooo check - gmail',
group: Group.lookup(name: 'Users'), group: Group.lookup(name: 'Users'),
customer_id: 2, customer_id: 2,
@ -250,7 +250,7 @@ Some Text"
updated_by_id: 1, updated_by_id: 1,
created_by_id: 1, created_by_id: 1,
) )
article = Ticket::Article.create( article = Ticket::Article.create!(
ticket_id: ticket.id, ticket_id: ticket.id,
from: 'some_sender@example.com', from: 'some_sender@example.com',
to: 'some_recipient@example.com', to: 'some_recipient@example.com',

View file

@ -7,7 +7,7 @@ class UserOutOfOfficeTest < ActiveSupport::TestCase
groups = Group.all groups = Group.all
roles = Role.where(name: 'Agent') roles = Role.where(name: 'Agent')
@agent1 = User.create_or_update( @agent1 = User.create!(
login: 'user-out_of_office-agent1@example.com', login: 'user-out_of_office-agent1@example.com',
firstname: 'UserOutOfOffice', firstname: 'UserOutOfOffice',
lastname: 'Agent1', lastname: 'Agent1',
@ -18,7 +18,7 @@ class UserOutOfOfficeTest < ActiveSupport::TestCase
roles: roles, roles: roles,
groups: groups, groups: groups,
) )
@agent2 = User.create_or_update( @agent2 = User.create!(
login: 'user-out_of_office-agent2@example.com', login: 'user-out_of_office-agent2@example.com',
firstname: 'UserOutOfOffice', firstname: 'UserOutOfOffice',
lastname: 'Agent2', lastname: 'Agent2',
@ -29,7 +29,7 @@ class UserOutOfOfficeTest < ActiveSupport::TestCase
roles: roles, roles: roles,
groups: groups, groups: groups,
) )
@agent3 = User.create_or_update( @agent3 = User.create!(
login: 'user-out_of_office-agent3@example.com', login: 'user-out_of_office-agent3@example.com',
firstname: 'UserOutOfOffice', firstname: 'UserOutOfOffice',
lastname: 'Agent3', lastname: 'Agent3',