mock-account.ts 480 B

12345678910111213141516
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import { useSessionStore } from '@shared/stores/session'
  3. import type { UserData } from '@shared/types/store'
  4. import { initializePiniaStore } from './components/renderComponent'
  5. export const mockAccount = (mockUser: Partial<UserData>) => {
  6. initializePiniaStore()
  7. const user = useSessionStore()
  8. user.user = {
  9. id: '123',
  10. internalId: 1,
  11. objectAttributeValues: [],
  12. ...mockUser,
  13. }
  14. }