Sha256: 8c1320f1d4f564f7147dbe023ed157285f57c3f9dbd025cf6bcc8364a0aabe1a
Contents?: true
Size: 720 Bytes
Versions: 3
Compression:
Stored size: 720 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) class ToadHopper::TestPosting < Test::Unit::TestCase def test_posting toadhopper = ToadHopper.new("abc123") error = begin; raise "Kaboom!"; rescue => e; e end response = toadhopper.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 = ToadHopper.new(ENV['HOPTOAD_API_KEY']) error = begin; raise "Kaboom!"; rescue => e; e end 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-0.9.2 | test/test_posting.rb |
toadhopper-0.9.1 | test/test_posting.rb |
toadhopper-0.9 | test/test_posting.rb |