Sha256: a76aa94aede391b64bf8d09e9ce7b2770d0c7280210b0519bf0dfe7328443d2b
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' describe MonkeyParty::List, :vcr do let(:list_name) { "Testing" } let(:list) { MonkeyParty::List.find_by_name(list_name) } let(:subscriber) do MonkeyParty::Subscriber.new("auser@launchware.com") end describe "subscribing" do let(:bad_subscriber) do MonkeyParty::Subscriber.new("badEmail") end it "subscribes someone successfully" do subs = list.create_subscribers([subscriber], :double_optin => false) subs[0].should be_valid #clean up after yourself list.destroy_subscribers([subs[0]], :delete_member => true) end it "handles errors gracefully" do subs = list.create_subscribers([bad_subscriber]) subs[0].should_not be_valid end end describe "unsubscribing" do after(:each) do list.destroy_subscribers([subscriber], :delete_member => true) end it 'should have valid subscribers' do subs = list.create_subscribers([subscriber], :double_optin => false) subs[0].should be_valid subs = list.destroy_subscribers([subscriber]) subs[0].should be_valid end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
monkey_party-0.3.2 | spec/monkey_party/list_spec.rb |
monkey_party-0.3.1 | spec/monkey_party/list_spec.rb |
monkey_party-0.3.0 | spec/monkey_party/list_spec.rb |