0
  -   ˆÀ�þZmÕœlH ’Jó¿ÏÏƒBÎ_�uÐb&=LyZËcõÄÍ W    # Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/

require 'rails_helper'

RSpec.describe Channel::Area::Whatsapp, type: :model do
  describe 'validations' do
    let(:another_channel) { create(:whatsapp_channel, phone_number_id:) }
    let(:phone_number_id) { 123_456_780 }

    before { another_channel }

    it 'allows to create another channel with a different phone number' do
      channel = create(:whatsapp_channel)

      expect(channel).to be_persisted
    end

    it 'does not allow to create another channel with the same phone number' do
      channel = build(:whatsapp_channel, phone_number_id:).tap(&:save)

      expect(channel.errors.full_messages).to include(%r{Phone number is already in use})
    end

    it 'allows to edit an existing channel' do
      channel = create(:whatsapp_channel)
      channel.options[:test] = true
      expect { channel.save! }.not_to raise_error
    end

    it 'not applicable to other areas' do
      expect_any_instance_of(Channel).not_to receive(:validate_whatsapp_phone_number)

      create(:google_channel)
    end
  end
end
  5   ˆl–Ãa¾”ªi?u8 ¸ÛW â˜´o�þZ�8àYŽ0
G#p¿ÏÑƒ™ÐÅÎ Ð    ÿfìXò”WŒá	k    KjÃ Yë×  °  YARB      °              H  l  )#i‹	O	O	Q    3#Q	!# ÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿ)#i‹MM!O	       9)			O	!) ÿÿÿÿÿÿÿÿ)i!‹KKM		  9'M'	 ÿÿÿÿÿÿÿÿ)i	!‹IIK		  9'K	'	 ÿÿÿÿÿÿÿÿ%'sO%sO%'sO%'!#'%s‹!#!'/'3539;?E9I	       ')))+)-I'9Û1«I«Q%%	 ÿÿÿÿÿÿÿÿ%		  A   ™   é   9  Ú  ñ	  E‰/home/pacs/hsh12/users/zammad/.rbenv/versions/3.4.13/lib/ruby/gems/3.4.0/gems/graphql-2.6.16/lib/graphql/schema/directive/specified_by.rb   E<main>   GraphQL  E!<module:GraphQL> Schema   E<class:Schema>   /   DirectiveE#<class:Directive>   SpecifiedBy  E'<class:SpecifiedBy>  EsExposes a URL that specifies the behavior of this scalar.	1  ò)  url  3 EgThe URL that specifies the behavior of this scalar.  description  locations#default_directiveargument Member   SCALAR   String   $  (  ¸  Ä  Ð  ä  ð        ,  4  D  \  ˜     ¤  ¬  °  è  ø      $  0  <    $   !H403239_•I|¥‰ÓMjqØ‚¦ ë<óo¬ÇÐ  ï    !<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
  $   #ˆÏÎÒ561Ía–Ãa¾”J_)â�~ãa¸ÛªbÑ¿Ñ 1    #‹      ½•]oÚ0†ïû+<_ìŸ¤u´Ž§Ž �™¶iÚ…ILâ5Ä‘cÝ¯Ÿ!A¤tëŠ*Eò×›sÎsŽ?è+Ô¿Œûè}x;Dã�ï†ƒÂ-€Oí€úÕÂq\€~€N�)® V«Yµ‰Ò	„HÍ"»€Òh›³3º™cgˆ¦‚Ç¶EÔH“	6Èc±FjŽ@-M)cq¾ëìZçDÆK#£Rp¥­.é�KX¨x™‰Ê‚É3
•=ëjt¦âû�g÷„^¬±mð|¶u¶éjFMŠ~ðL&¹‡�*0£r‘ RG©¼„YÆó;’È9F<3þ:è�¾Y˜tó7£¥ZÌ=ü¶ç×#ï³€/~Xs[i†6bdc”s)â£âi%žÊŸÇúVãcæ‹2Ò²0Rå{)XÄ&j¤2›ËÚ±©nª*Iü·lðèA2Æ7“~úƒI•’xcbÝÿÖ³1×"7È—ZDFéû©²ÿ:Ÿ•Åõnˆê€µLRƒB-tPùJ#Ö¦I~òÙ3Ö¦}bÖÖqcÐŒö·ðÜî¥Ór\û!Ç½r„ŽÛäÍ‡—âF¡¾ÂØ÷OA�:—Ï®Æ2¿ËÕ*o‚Ø-}äá¦JÛÕ¾"ß¹ÆìøÚi@;Ï.×@‹l™È¼×‡^iRhUm¤(1{lõ°.é¾$l}…7‹ùÇÔIŽ\ç1¬¼F¡~`(l1
Õóù�s°ò¡       %ˆÊ�þ_+ë6IZšq¹$hÏÔƒl»ÓÉ¾Ñ 	é    %‹ xa�™Ks#IÇÏåO‘;†¥m£Ö³5xÍzÆÖb˜ÏÚ3³Àz[Ý%»q«[ÓÝòcöñuˆàÜ�8Á	8À8±'‚l�Y%µ²¤ô„²»ª²òW]•ÿ¬*iJ½™†Uwë|NÖÖáA~¡‹Ž!:ýM¿±~¿ßÂ&´%ÖmaœÇÉ(Ñ%TgI	çúš*GyÓRC’Á ÉÒ0‹�>Ç—:ÖÙ:^Ãö‘>ÍòbëËºÈÊTW•ÎÞ,Ãq²5Mª­,ßA«½<šŽuVéx`7Šð±$ŸÛ;bÆD,ÉãaëâPyŽÏ’Qå™ÇÝ´z«Ø\<zuÛÚúšn	�ÍöFw#Øð›keU$Ùi	a‰o0Óµ5…VQk ðáØ/£p¢×°aZ-5>ÒUx2³ÀAùðïÞD‹<ÓJ_Ei8V‹GÁ[sî­ÈUîÀ›p‡»k¡Iu™«Ó§h˜ª°ªŸ×¢<«Š<]2Ï¦©ÀjÍYè�X-Xçœ6qÎ
­U61.’ÓL-WÀö«f«]3ÉQÛð)Ø†Nî Ñ(Ÿ*ÎÓ4,TªËR�:¬t! Éü�­=†Ñy™†å™ÀîÌÙä›Ðø4pn—¸É…V]PÔ)Sà5½Ëéâ5†ÒéY% [ ]Ò ºðÎïa{™\©pŒ¸¥£œ’ ï1xXFI%ŠG`÷æltIè|Þ‡8> ¼¾Ð™23¨½ŽNõ¨R�«^$à†Ÿf¨Ä2ÊiÙƒšNþ‰Àgáëð>ç÷ÑHÓÔ©	ê<3àÙŒÖÏf8ÂH¨ï6V½?§ïDïÃëðMø�Ñýé$Am¸YBÅ×ÓâoXZÓÛ È