create_spec.rb 737 B

123456789101112131415161718192021222324252627
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'models/form_updater/concerns/checks_core_workflow_examples'
  4. RSpec.describe(FormUpdater::Updater::User::Create) do
  5. subject(:resolved_result) do
  6. described_class.new(
  7. context: context,
  8. relation_fields: relation_fields,
  9. meta: meta,
  10. data: data,
  11. id: nil
  12. )
  13. end
  14. let(:user) { create(:agent) }
  15. let(:context) { { current_user: user } }
  16. let(:meta) { { initial: true, form_id: SecureRandom.uuid } }
  17. let(:data) { {} }
  18. let(:relation_fields) do
  19. []
  20. end
  21. include_examples 'FormUpdater::ChecksCoreWorkflow', object_name: 'User'
  22. end