~tim/wuparty

6e341c41416cdc47078f7f5cbaf6eacb37d31e8b — Yaf 9 years ago 1806242
add reader on id to be abble to use it from list of forms
2 files changed, 5 insertions(+), 0 deletions(-)

M lib/wuparty.rb
M test/wuparty_test.rb
M lib/wuparty.rb => lib/wuparty.rb +1 -0
@@ 187,6 187,7 @@ class WuParty
      @details = options[:details]
    end

    attr_reader :id
    attr_accessor :details
  end


M test/wuparty_test.rb => test/wuparty_test.rb +4 -0
@@ 28,6 28,10 @@ class WuPartyTest < Test::Unit::TestCase
    assert_equal 'Test Form', form['Name']
  end

  def test_get_form_id
    assert_equal 1, @wufoo.forms.select {|f| f.id == 'test-form'}.length
  end

  def test_form_by_hash
    hash = @wufoo.form(@form_id)['Hash']
    assert @wufoo.form(hash)