test/epom/campaign_test.rb in epom-0.8.5 vs test/epom/campaign_test.rb in epom-0.9

- old
+ new

@@ -341,12 +341,18 @@ :hash => Epom.create_hash(Epom.create_hash(ENV['password']), timestamp), :timestamp => timestamp, :username => ENV['username'], } - # PENDING - # response = Epom::Campaign.adjusted_cpm_list(url_params, body_params) + response = Epom::Campaign.adjusted_cpm_list(url_params, body_params) + assert_instance_of Array, response + if response.count > 0 + first = response[0] + assert_instance_of Fixnum, first['id'] + assert_instance_of Float, first['value'] + assert_instance_of String, first['country'] + end end ########################## ## Campaign Action Management API ########################## @@ -420,9 +426,20 @@ response = Epom::Campaign.update_campaign_pricing(url_params, body_params) assert_not_instance_of Fixnum, response pricing = test_get_campaign_pricing() assert_equal 2.9, body_params[:price] + end + + test "get_device_values" do + timestamp = Time.now.to_i * 1000 + url_params = { + :campaignId => ENV['campaign_id'], + } + body_params = {} + + response = Epom::Campaign.get_device_values(url_params, body_params) + # assert_not_instance_of Fixnum, response end define_get_tests_auto(Epom::Campaign) end \ No newline at end of file