Sha256: 6c83b893f49bc0fe4dde28292038ab6e9f771657c155f966d0f788534d565a96

Contents?: true

Size: 1.48 KB

Versions: 22

Compression:

Stored size: 1.48 KB

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'helper'))

context "AdGroupCriterion" do
  context "search" do
    setup do
      run_with_rescue do
        SessionHelper.sales_coord.call_api CityGrid::API::Advertising::AdGroupCriterion,
          :search, 
          :adGroupId => 6
      end
    end
    
    should("not be empty?"){ !topic.empty? }
    should("return code OK"){ topic.adGroupCriterions.first.response.code }.equals(200)
    should("return message OK") { topic.adGroupCriterions.first.response.message }.equals("OK")
  end

  context "mutate" do
    setup do
      run_with_rescue do
        SessionHelper.sales_coord.call_api CityGrid::API::Advertising::AdGroupCriterion,
          :mutate,
          "mutateOperationListResource" => [{
            "operator" => "ADD",
            "operand" => {
              "adGroupId" => "2",
              "adGroupAdId" => "1",
              "adGroupCriterionId" =>
              "1722",
              "type" => "2"
            }
          }, {
            "operator" => "REMOVE",
            "operand" => {
              "adGroupId" => "2",
              "adGroupAdId" => "1",
              "adGroupCriterionId" => "1722",
              "type" => "2"
            }
          }]
      end
    end
    should("not be empty"){ !topic.empty? }
    should("return code OK"){ topic.adGroupCriterions.first.response.code }.equals(200)
    should("return message OK") { topic.adGroupCriterions.first.response.message }.equals("OK")
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
citygrid_api-0.0.28 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.27 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.26 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.25 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.24 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.23 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.22 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.21 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.20 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.19 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.18 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.17 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.16 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.15 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.14 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.13 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.12 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.11 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.10 test/api/advertising/test_ad_group_criterion.rb
citygrid_api-0.0.9 test/api/advertising/test_ad_group_criterion.rb