Sha256: 2ff285f0952c08c2c7ab20c3f97cd5ea53a7a2349ae493672e660f21f0ec73f8

Contents?: true

Size: 1.15 KB

Versions: 13

Compression:

Stored size: 1.15 KB

Contents

require 'spec_helper'

module CurationConcerns
  module Workflow
    RSpec.describe NotificationConfigurationParameter, no_clean: true do
      describe '#build_from_workflow_action_configuration' do
        let(:config) do
          {
            name: 'name_of_notification', notification_type: Sipity::Notification::NOTIFICATION_TYPE_EMAIL,
            to: ['role_name_to'], cc: ['role_name_cc'], bcc: ['role_name_bcc']
          }
        end
        it 'will build based on the given action' do
          expected = described_class.new scope: 'name_of_action',
                                         reason: Sipity::NotifiableContext::REASON_ACTION_IS_TAKEN,
                                         recipients: { to: config.fetch(:to), cc: config.fetch(:cc), bcc: config.fetch(:bcc) },
                                         notification_name: config.fetch(:name),
                                         notification_type: config.fetch(:notification_type)
          actual = described_class.build_from_workflow_action_configuration(workflow_action: 'name_of_action', config: config)
          expect(actual).to eq(expected)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.7 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-2.0.0 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-2.0.0.rc2 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.6 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.5 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.4 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.3 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.2 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-2.0.0.rc1 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.1 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.0 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
curation_concerns-1.7.0.beta1 spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb