Sha256: e1b8227fc31e473d128cb3d955633910efa3364d8d69de34ffc16aeb38248f30

Contents?: true

Size: 701 Bytes

Versions: 8

Compression:

Stored size: 701 Bytes

Contents

require 'helper'

class TestTag < Test::Unit::TestCase
  def setup
    @client = Whatser::Client.new
    @poi_id = 1
    @tag = Whatser::Tag.new(:poi_id => @poi_id, :name => 'my tag')
  end
  
  def test_list
    assert @client.tags.list(@poi_id, :page => 1).is_a?(Whatser::Response)
  end
  
  def test_create
    assert @client.tags.create(@poi_id, 'my tag').is_a?(Whatser::Response)
  end
  
  def test_delete
    assert @client.tags.delete(@poi_id, 'my tag').is_a?(Whatser::Response)
  end  
  
  def test_save
    assert @tag.save.is_a?(Whatser::Response)
  end
    
  def test_to_params
    params = [:name]
    params.each do |p|
      assert @tag.to_params.keys.include?(p)
    end
  end  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
whatser-0.6.1 test/test_tag.rb
whatser-0.6.0 test/test_tag.rb
whatser-0.5.0 test/test_tag.rb
whatser-0.4.0 test/test_tag.rb
whatser-0.3.2 test/test_tag.rb
whatser-0.3.1 test/test_tag.rb
whatser-0.3.0 test/test_tag.rb
whatser-0.2.0 test/test_tag.rb