Sha256: 0099a92ac485cb33fa8c9f1e8c407f3246e4f596bbc5f8462053cf1790caad8d

Contents?: true

Size: 844 Bytes

Versions: 4

Compression:

Stored size: 844 Bytes

Contents

require 'spec_helper'

describe Sendgrid::Web::Bounces do
  before(:all) do
    Sendgrid::Web::Client.configure do |config|
      config.username = 'foo'
      config.password = 'bar'
    end
  end

  describe '#get' do
    it_behaves_like('a sendgrid response', '/api/bounces.get.json') do
      let(:action) { subject.get }
      let(:response) do
        '[
          {
            "status": "4.0.0",
            "created": "2011-09-16 22:02:19",
            "reason": "Unable to resolve MX host sendgrid.ne",
            "email": "esting@sendgrid.ne"
          }
        ]'
      end
    end
  end

  describe '#delete' do
    it_behaves_like('a sendgrid response', '/api/bounces.delete.json') do
      let(:action) { subject.delete }
      let(:response) do
        '{
          "message": "success"
        }'
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sendgrid-web-0.1.0 spec/sendgrid/web/bounces_spec.rb
sendgrid-web-0.0.7 spec/sendgrid/web/bounces_spec.rb
sendgrid-web-0.0.6 spec/sendgrid/web/bounces_spec.rb
sendgrid-web-0.0.5 spec/sendgrid/web/bounces_spec.rb