Sha256: 2db6c9e477c2623f08dea28b4a10e0683290ef0b88068869db42aa16b48a7f48

Contents?: true

Size: 1.25 KB

Versions: 24

Compression:

Stored size: 1.25 KB

Contents

require 'test_helper'
require 'epom/category'

class CategoryTest < ActiveSupport::TestCase
	test "truth" do
    assert_kind_of Class, Epom::Category
  end

  test "get_publishing_categories" do
    timestamp = Time.now.to_i * 1000
    body_params = {
      :hash => Epom.create_hash(Epom.create_hash(ENV['password']), timestamp),
      :timestamp => timestamp, 
      :username => ENV['username'],
    }

    response = Epom::Category.get_publishing_categories({}, body_params)
    assert_instance_of Array, response
    if response.count > 0
      first = response[0]
      assert_instance_of Hash, first
      assert_instance_of Fixnum, first['id']
      assert_instance_of String, first['name']
    end
  end

  test "get_advertising_categories" do
    timestamp = Time.now.to_i * 1000
    body_params = {
      :hash => Epom.create_hash(Epom.create_hash(ENV['password']), timestamp),
      :timestamp => timestamp, 
      :username => ENV['username'],
    }

    response = Epom::Category.get_advertising_categories({}, body_params)
    assert_instance_of Array, response
    if response.count > 0
      first = response[0]
      assert_instance_of Hash, first
      assert_instance_of Fixnum, first['id']
      assert_instance_of String, first['name']
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
epom-0.10.13 test/epom/category_test.rb
epom-0.10.11 test/epom/category_test.rb
epom-0.10.10 test/epom/category_test.rb
epom-0.10.9 test/epom/category_test.rb
epom-0.10.8 test/epom/category_test.rb
epom-0.10.7 test/epom/category_test.rb
epom-0.10.5 test/epom/category_test.rb
epom-0.10 test/epom/category_test.rb
epom-0.9.9 test/epom/category_test.rb
epom-0.9.8 test/epom/category_test.rb
epom-0.9.7 test/epom/category_test.rb
epom-0.9.6 test/epom/category_test.rb
epom-0.9.4 test/epom/category_test.rb
epom-0.9.2 test/epom/category_test.rb
epom-0.9.1 test/epom/category_test.rb
epom-0.9 test/epom/category_test.rb
epom-0.8.5 test/epom/category_test.rb
epom-0.8.4 test/epom/category_test.rb
epom-0.8.1 test/epom/category_test.rb
epom-0.8 test/epom/category_test.rb