Sha256: 123ba9088b1ab80a41de0ca318d711839ab193b0b7a14d150a771ffa58b0435c

Contents?: true

Size: 581 Bytes

Versions: 3

Compression:

Stored size: 581 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))

class Toadhopper::TestPosting < Test::Unit::TestCase
  def test_posting
    response = Toadhopper('bogus key').post!(error)
    assert_equal 422, response.status
    assert_equal ['No project exists with the given API key.'], response.errors
  end

  if ENV['HOPTOAD_API_KEY']
    def test_posting_integration
      toadhopper.filters = "HOPTOAD_API_KEY", "ROOT_PASSWORD"
      response = toadhopper.post!(error)
      assert_equal 200, response.status
      assert_equal [], response.errors
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
toadhopper-1.0.2 test/test_posting.rb
toadhopper-1.0.1 test/test_posting.rb
toadhopper-1.0.0 test/test_posting.rb