Skip to content

Commit

Permalink
cleaned test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kr1sp1n committed Apr 13, 2011
1 parent ebe3b04 commit f510c9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
14 changes: 7 additions & 7 deletions test/helper.rb
Expand Up @@ -15,15 +15,15 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'zanox'

TEST_CONNECT_ID = "668189244D19BABF75AC"
TEST_OFFLINE_TOKEN = "9B4D9964A7484E750EA80B841E1B31649F02D6E4FBBBC995778CA1A4F133949539E6FE"
TEST_PUBLIC_KEY = "3A58C794D2A828661803"
TEST_SECRET_KEY = "1e2d8dC839Fc4A+aa92207b1dc6c5C/849012B4c"
TEST_CONNECT_ID = "your connect id"
TEST_OFFLINE_TOKEN = "your offline token"
TEST_PUBLIC_KEY = "your public key as developer"
TEST_SECRET_KEY = "your secret key"

TEST_USER_FIRSTNAME = "Krispin"
TEST_ADSPACE_ID = "710796"
TEST_USER_FIRSTNAME = "your publisher user name"
TEST_ADSPACE_ID = "your test adspace id"

TEST_SALE_ID = "92ba89e7-b229-4933-857c-e307c0291856"
TEST_SALE_ID = "your test sale id"
TEST_SALE_DATE = "2010-03-02T00:00:00"

class Test::Unit::TestCase
Expand Down
24 changes: 8 additions & 16 deletions test/test_zanox.rb
Expand Up @@ -53,21 +53,13 @@ class TestZanoxProgramApplication < Test::Unit::TestCase
should "find program applications by an adspace" do
assert(Zanox::ProgramApplication.find(:adspaceId=>TEST_ADSPACE_ID).size >= 1)
end

should "find riemer's program applications for zalando.nl" do
Zanox::API::Session.offline('FDF159E4E3FB13A2D594FF7467693A4DF6D66864ECEBD235350473C438C82E043716FD')
puts
puts "Riemer's connect id : " + Zanox::API::Session.connect_id
puts
assert(Zanox::ProgramApplication.find(:adspaceId=>'731770').size >= 1)
end
end

# class TestZanoxSale < Test::Unit::TestCase
# should "find all sales for a given date" do
# assert(Zanox::Sale.find(:date=>TEST_SALE_DATE, :dateType=>'trackingDate').size.should >= 1)
# end
# should "find a sale by its id" do
# assert_equal(1, Zanox::Sale.find(TEST_SALE_ID).size)
# end
# end
class TestZanoxSale < Test::Unit::TestCase
should "find all sales for a given date" do
assert(Zanox::Sale.find(:date=>TEST_SALE_DATE, :dateType=>'trackingDate').size.should >= 1)
end
should "find a sale by its id" do
assert_equal(1, Zanox::Sale.find(TEST_SALE_ID).size)
end
end

0 comments on commit f510c9d

Please sign in to comment.