Sha256: 0fa434026dd924e82a8caad8276bf9a8b3376d6eaa05cbb3c8dd77a867dfd6cf

Contents?: true

Size: 803 Bytes

Versions: 1

Compression:

Stored size: 803 Bytes

Contents

require_relative '../lib/config.rb'

RSpec.describe 'Publications API', :order => :defined do
  before(:each) do
    @publications_api_instance = Config.publications_api_instance()
    @voucherify_data = VoucherifyData.instance()
  end

  it 'create a publication', :order => :first do
    publication = @publications_api_instance.create_publication({
        join_once: true,
        publications_create_request_body: VoucherifySdk::CreatePublicationWithCampaign.new({
          customer: VoucherifySdk::Customer.new({
            id: @voucherify_data.get_customer().id
          }),
          campaign: VoucherifySdk::CreatePublicationCampaign.new({
              name: @voucherify_data.get_discount_campaign().name
            })
          })
      })
    expect(publication).not_to be_nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voucherify-5.0.0 __tests__/spec/4_publications_spec.rb