Sha256: 6a15e2f0b81fb64e5c8860d628710383425222fbf078012e54359e3f691d27e6

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

require 'test_helper'
require 'epom/analytic'

class AnalyticTest < ActiveSupport::TestCase
  test "truth" do
    assert_kind_of Class, Epom::Analytic
  end

  test "analytics" do
    timestamp = Time.now.to_i * 1000
    url_params = {
      :format => 'CSV',
      :login => ENV['username'],
      :timestamp => timestamp,
      :hash => Epom.create_hash(Epom.create_hash(ENV['password']), timestamp)
    }
    body_params = {    
      :displayIds => true,
      :range => 'CURRENT_MONTH',
      :groupBy => 'ADVERTISER,CAMPAIGN,BANNER,SITE,ZONE,PLACEMENT,CHANNEL,COUNTRY',
      # :groupRange => 'HOUR',
      # :eqLong => {'ADVERTISER' => 1252, 'SITE' => 1059},
      :eqLong => {'CAMPAIGN' => 2679},
      :eqStr => {'COUNTRY' => 'IN', 'CHANNEL' => 'Other'}
    }

    response = Epom::Analytic.analytics(url_params, body_params)
    assert_not_instance_of Fixnum, response
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
epom-0.10.13 test/epom/analytic_test.rb
epom-0.10.11 test/epom/analytic_test.rb
epom-0.10.10 test/epom/analytic_test.rb