Sha256: 847b668b31f47863442f52fc97bc8f2fb794430b3a1136966fe17109c7873464

Contents?: true

Size: 673 Bytes

Versions: 1

Compression:

Stored size: 673 Bytes

Contents

require 'spec_helper'

describe 'posting a delivery', :integration do
  let(:template)  { :test }
  let(:recipient) { { :email => "test@example.com" } }
  let(:payload)   { { :greeting => "Gday!" } }

  before do
    Mailstro.configure do |config|
      config.use_ssl     = ENV['MAILSTRO_USE_SSL'] == 'true'
      config.endpoint    = ENV['MAILSTRO_ENDPOINT']
      config.api_version = ENV['MAILSTRO_API_VERSION']
      config.api_key     = ENV['MAILSTRO_API_KEY']
    end
  end

  it "succesfully submits a delivery to mailstro", :vcr do
    response = Mailstro.deliver(template, :recipient => recipient, :payload => payload)
    response['ok'].should == true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mailstro-0.0.2 spec/integration/posting_a_delivery_spec.rb