Sha256: b3f4ef36df2a112c4d359c565a61cc1a02f2828765c51b8c06d4b6228dd609af
Contents?: true
Size: 1.05 KB
Versions: 3
Compression:
Stored size: 1.05 KB
Contents
require 'helper' class TestClient < Test::Unit::TestCase context "CitrusMail::Client" do setup do @api_key = 'fake_key' @client = CitrusMail::Client.new(@api_key) end context "#flatten_params with {'a' => 'b', 'c' => {'d' => 'e', 'f' => 'g'}}" do should "return {'a' => 'b', 'c[d]' => 'e', 'c[f]' => 'g'}" do params = {'a' => 'b', 'c' => {'d' => 'e', 'f' => 'g'}} ret = @client.flatten_params(params) assert ret == {'a' => 'b', 'c[d]' => 'e', 'c[f]' => 'g'} end end context "#process_params with {'a' => 'b'}" do should "return {'a' => 'b', :api_key => 'fake_key'}" do params = {'a' => 'b'} ret = @client.process_params(params) assert ret == {'a' => 'b', :api_key => @api_key} end end context "#get_list with list_key" do setup do @list_key = "fake_list_key" end should "return CitrusMail::List instance" do list = @client.get_list(@list_key) assert list.is_a?(CitrusMail::List) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
citrus-mail-0.2.1 | test/test_client.rb |
citrus-mail-0.2.0 | test/test_client.rb |
citrus-mail-0.1.0 | test/test_client.rb |