Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.729 kb
require File.expand_path("../../lib/itunes_ingestion", __FILE__)
describe ITunesIngestion::SalesReportParser do
let (:data) { open(File.expand_path("../report/report.txt", __FILE__)).read }
it "parse report" do
report = ITunesIngestion::SalesReportParser.parse(data)
report.class.should == Array
report.length.should == 2
first_report = report.first
first_report[:sku].should == "UT124500"
first_report[:product_type_id].should == "10"
first_report[:title].should == "App1"
first_report[:begin_date].should == Date.new(2011, 2, 1)
first_report[:country_code].should == "TW"
first_report[:currency].should == "USD"
first_report[:currency_of_proceeds].should == "USD"
end
end
Jump to Line
Something went wrong with that request. Please try again.