2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2020-09-11 07:25:47 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2021-03-01 08:18:40 +00:00
|
|
|
RSpec.describe Ticket::Article::AddsMetadataGeneral, current_user_id: -> { agent.id } do
|
2020-09-11 07:25:47 +00:00
|
|
|
let(:agent) { create(:agent) }
|
|
|
|
|
|
|
|
context 'when customer is agent' do
|
|
|
|
let(:customer) { create(:agent) }
|
|
|
|
|
|
|
|
it 'show customer agent details in from field' do
|
|
|
|
ticket = create(:ticket, customer_id: customer.id)
|
|
|
|
article = create(:ticket_article, :inbound_phone, ticket: ticket)
|
|
|
|
|
|
|
|
expect(article.from).to include customer.email
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|