Sha256: 6d9bbe44c342cbe2f598da5c7af265a5ea9957d9738cc6df9e3596b470d4cc92
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require 'test_helper' class ContentTest < Minitest::Test describe "API Call: content" do before do api_url = 'http://api.sailthru.com' @secret = 'my_secret' @api_key = 'my_api_key' @sailthru_client = Sailthru::SailthruClient.new(@api_key, @secret, api_url) @api_call_url = sailthru_api_call_url(api_url, 'content') end it "can push content with title, url, *array* tags and vars" do title = 'unix is awesome' url = 'http://example.com/hello-world' date = nil tags = ['unix', 'linux'] vars = {:price => 55, :description => 'Hello World'} stub_post(@api_call_url, 'content_valid.json') response = @sailthru_client.push_content(title, url, date = nil, tags = tags, vars = vars) refute_nil response['content'] end it "can push content with title, url, *string* tags and vars" do title = 'unix is awesome' url = 'http://example.com/hello-world' date = nil tags = 'unix, linux' vars = {:price => 55, :description => 'Hello World'} stub_post(@api_call_url, 'content_valid.json') response = @sailthru_client.push_content(title, url, date = nil, tags = tags, vars = vars) refute_nil response['content'] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sailthru-client-3.0.0 | test/sailthru/content_test.rb |