Sha256: cb211cee97762fb8501cfac2f85309b288ef2a6e71a55cbf691edea904331950
Contents?: true
Size: 792 Bytes
Versions: 1
Compression:
Stored size: 792 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' include API::Base include API::WhatCounts describe OneOffMessageRequest do include RequestSpecHelper it "should initialize with an API url to call" do OneOffMessageRequest.new.url.should eql("https://secure.whatcounts.com/bin/api_web") end it "should accept data for the message and store internally in the data hash" do test_attrs = {:pwd => 'test', :list_id => 1, :realm => 'test', :format => 1, :to => 'test@test.com', :template_id => 1, :data => {:first => 'Test'}} message_request = OneOffMessageRequest.new message_request.set_data(mock_one_off_message) message_request.data.should == test_attrs.merge({:cmd => 'send'}) # the 'send' command is added internallly for the API call end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pdsphil-ruby-whatcounts-0.1.0 | lib/whatcounts/spec/api_request_spec.rb |