#!/usr/bin/partner2-test -w
{
   "name" : "Добавление правила с блоками",
   "options" : {
      "fields" : {
         "business_rules" : [
            "rule_id",
            "caption",
            "cpm",
            "conditions",
            "position",
            "multistate",
            "multistate_name",
            "blocks_count"
         ]
      },
      "mock_bk" : true,
      "read_only" : false
   },
   "testcase" : "",
   "tests" : [
      {
         "request" : {
            "body" : {
               "data" : {
                  "attributes" : {
                     "blocks" : [
                        "R-AB-153745-1"
                     ],
                     "caption" : "XXX_2",
                     "conditions" : {
                        "browsers" : [
                           2,
                           3
                        ],
                        "query_args" : {
                           "adb_enabled" : [
                              1
                           ],
                           "puid10" : [
                              "xxx",
                              "yy"
                           ],
                           "puid20" : [
                              "foo"
                           ]
                        }
                     },
                     "cpm" : 9999
                  },
                  "type" : "business_rules"
               }
            },
            "method" : "post",
            "name" : "Добавление бизнес правила c 'adb_enabled' под юзером $TOKEN",
            "token" : "mocked-context-adblock-partner",
            "url" : "/v1/business_rules"
         },
         "response" : {
            "body" : {
               "data" : {
                  "attributes" : {},
                  "id" : "22",
                  "links" : {
                     "self" : "https://127.0.0.1:80/v1/business_rules/22"
                  },
                  "relationships" : {},
                  "type" : "business_rules"
               }
            },
            "content_type" : "application/vnd.api+json",
            "status" : "201"
         }
      }
   ]
}
