require File.expand_path('../test_assistant', __FILE__) require "digest/md5" module Pingpp class CouponTemplateTest < Test::Unit::TestCase should "execute should return a coupon_template list when passed correct parameters" do ctmpl = Pingpp::CouponTemplate.list({:per_page => 3}) assert ctmpl.object == 'list' assert ctmpl.data.count <= 3 end should "execute should return an exist coupon_template when passed correct id" do ctmpl = Pingpp::CouponTemplate.retrieve(get_coupon_template_id) assert ctmpl.object == 'coupon_template' assert ctmpl.id == get_coupon_template_id end should "execute should return a coupon list made from coupon_template when passed correct coupon_template_id" do coupons = Pingpp::CouponTemplate.list_coupons(get_coupon_template_id, {:per_page => 3}) assert coupons.object == 'list' assert coupons.data.count <= 3 end # should "execute should return a coupon list made from coupon_template when passed correct coupon_template_id and parameters" do # coupons = Pingpp::CouponTemplate.create_coupons(get_coupon_template_id, {:users => [get_user_id]}) # # assert coupons.object == 'list' # assert coupons.data.count <= 3 # end end end