Sha256: b895a6687f96494100b015c47bae3ddefbba188c224f448b19debee7b7f2d200

Contents?: true

Size: 1020 Bytes

Versions: 1

Compression:

Stored size: 1020 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

module Tamber
  class DiscoverTest < Test::Unit::TestCase
    should "return recommendations" do
      begin
        d = Tamber::Discover.recommended(
          :user => 'user_jctzgisbru',
          :get_properties => true,
          :filter => {
            :eq => [
              {"property" => "clothing_type"},
              "pants"
            ]
          }
        )
        d.each { |rec| puts "item: #{rec.item}, score: #{rec.score}"}
      end
    end

    should "return similar" do
      begin
        d = Tamber::Discover.similar(
          :item => 'item_i5gq90scc1'
        )
        d.each { |rec| puts "item: #{rec.item}, score: #{rec.score}"}
      end
    end

    should "return recommendedSimilar" do
      begin
        d = Tamber::Discover.recommendedSimilar(
          :user => 'user_jctzgisbru',
          :item => 'item_i5gq90scc1'
        )
        d.each { |rec| puts "item: #{rec.item}, score: #{rec.score}"}
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tamber-0.1.4 test/discover_test.rb