Sha256: 312c7a108f418735eb98cc972186b1f5757d98e0ae5922703500b3d0b74f6f0d

Contents?: true

Size: 823 Bytes

Versions: 3

Compression:

Stored size: 823 Bytes

Contents

require 'spec_helper'

describe Sendgrid::Web::SpamReports 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/spamreports.get.json') do
      let(:action) { subject.get }
      let(:response) do
        '[
          {
            "ip": "174.36.80.219",
            "email": "example@aol.com",
            "created": "2009-12-06 15:45:08"
          }
        ]'
      end
    end
  end

  describe '#delete' do
    it_behaves_like('a sendgrid response', '/api/spamreports.delete.json') do
      let(:action) { subject.delete(email: 'foobar@example.com') }
      let(:response) do
        '{
          "message": "success"
        }'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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