3
  [   	ˆl–Ãa¾”ªi?u8 ¸Û71hß�þZÖqÀ³ÈV†ÈþÇƒÆ_�uÐb&=LyZËcõa–äY>” ”¾R( 	ÅýÆ�¸Û*bÑ¿Å     	# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/

require 'rails_helper'

# What marking all notifications as seen does is covered by spec/services/service/online_notification/mark_all_as_seen_spec.rb â€”
#   this covers the GraphQL surface only.
RSpec.describe Gql::Mutations::OnlineNotification::MarkAllAsSeen, authenticated_as: :user, type: :graphql do
  let(:user) { create(:agent) }

  let(:query) do
    <<~QUERY
      mutation onlineNotificationMarkAllAsSeen {
        onlineNotificationMarkAllAsSeen {
          success
        }
      }
    QUERY
  end

  before do
    allow(Service::OnlineNotification::MarkAllAsSeen).to receive(:execute).and_call_original
    gql.execute(query)
  end

  it 'calls the MarkAllAsSeen service' do
    expect(Service::OnlineNotification::MarkAllAsSeen)
      .to have_received(:execute).with(current_user: user)
  end

  it 'returns success' do
    expect(gql.result.data).to include('success' => true)
  end

  it_behaves_like 'graphql responds with error if unauthenticated'
end
  7   ˆl–äY>”Êa,je@ãn\”Å£�þ]‘°,Ü­	ÇÂûdt þÊ„d@xÉ¿Æ ?÷     ELF          >            @       �v          @ 8 	 @                                 Ø      Ø                                           }'      }'                    P       P       P      Ì      Ì                   0k      0k      0k      à	      è                   �k      �k      �k                               8      8      8      $       $              Påtd   Y      Y      Y      Ô       Ô              Qåtd                                                  Råtd   0k      0k      0k      Ð      Ð                      GNU =$ug«¾*åÄL�G|�¿ø–Ž!§       8         À@HL ‘Á(*ì8               9   :   <   ?   B       C   D   F   G       H   I   ™	ÇÁ½"ôØ—ÀÅ?kQ®a
üzªL]¬�£æ¯Y�+Õ>	QÕ>}ÿ FaÓœã&)Í ^V³uî|·9kÊZíÙ›W                            S                     b                                            —                     l                     ×                     î                     �                     r                     …                     0                     ©                     d                     É                     *                     ž                                          ï                     U                     z                     è                     Œ                     s                     ³                     >                     ]                                            õ                     ¬                     ¡                     ¾                     y                     L                                          ‚                     X                     M                     š                     D                     Ê                     :                                           ×                     ¸                     ©                     ’                     ž                     Ã                     Ê                     ,                                            F   "                   „                     }                     2                     L    €%      3       ‘     `2      è          @E      3            P4      Ô       Ø    `D      Ù       ±     00      (      ÷    °?      6      º    P.      Ý      Ô     `8      1      å      ;            j      %      9       (    €-      Í           À6             ö     05      �      |     `%             U     @$      Ñ       Â     °=      ü      ã    ðC      a        __gmon_start__ _ITM_deregisterTMCloneTable _ITM_registerTMCloneTable __cxa_finalize sock_back_initialize sock_back_db_init sock_back_db_destroy sock_back_bind sock_back_unbind sock_back_search sock_back_compare sock_back_modify sock_back_modrdn sock_back_add sock_back_delete sock_back_extended sock_b