Sha256: 9883a5901b5a1e307374bc856b5151c1c2b880d2de1fac394c0a197cc57156d3
Contents?: true
Size: 699 Bytes
Versions: 3
Compression:
Stored size: 699 Bytes
Contents
require File.dirname(__FILE__) + '/helper' class TestUser < Test::Unit::TestCase def test_build_query_string @gattica = Gattica.new(:token => 'ga-token', :profile_id => 'ga-profile_id') expected = "ids=ga:ga-profile_id&start-date=2008-01-02&end-date=2008-01-03&dimensions=ga:pageTitle,ga:pagePath&metrics=ga:pageviews&sort=-ga:pageviews&max-results=3" result = @gattica.send(:build_query_string, { :start_date => Date.civil(2008,1,2), :end_date => Date.civil(2008,1,3), :dimensions => ['pageTitle','pagePath'], :metrics => ['pageviews'], :sort => '-pageviews', :max_results => '3'}, 'ga-profile_id') assert_equal expected, result end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gicodewarrior-gattica-0.5.2 | test/test_gattica.rb |
gicodewarrior-gattica-0.5.1 | test/test_gattica.rb |
gicodewarrior-gattica-0.5.0 | test/test_gattica.rb |