Sha256: ba259b25205eea3834e257008d9cd33d4fa4e39b8d1e7883f6b18a4a8c736110
Contents?: true
Size: 824 Bytes
Versions: 1
Compression:
Stored size: 824 Bytes
Contents
require 'spec_helper' describe 'posting a list delivery', :integration do let(:template_name) { :test } let(:list_name) { :customers } let(:data) { { :message => "Are you ok?" } } before do Mailstro.configure do |config| config.api_key = 'lolapi' end end let(:expected_body) {{ "api_key" => "lolapi", "template_name" => "test", "list_name" => "customers", "data" => { "message" => "Are you ok?" } }} it "succesfully submits a list delivery to mailstro" do stub_request(:post, "https://api.mailstroapp.com/v1/lists/deliveries"). with(:body => expected_body).to_return(:status => 200, :body => fixture("response.json")) response = Mailstro.list_deliver(template_name, list_name, data) response[:success].should == true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mailstro-0.0.6 | spec/integration/list_delivery_spec.rb |