Sha256: c854e7bc96450db888f762793c43b41c0a5ee4a9a6450355175746e37b95b06e
Contents?: true
Size: 1.74 KB
Versions: 16
Compression:
Stored size: 1.74 KB
Contents
require File.expand_path("#{File.dirname(__FILE__)}/test_helper") class TestReleases < Minitest::Test def test_get_releases with_app do |app_data| response = heroku.get_releases(app_data['name']) assert_equal(200, response.status) # body assertion? end end def test_get_releases_app_not_found assert_raises(Heroku::API::Errors::NotFound) do heroku.get_releases(random_name) end end def test_get_release with_app do |app_data| current = heroku.get_releases(app_data['name']).body.last['name'] response = heroku.get_release(app_data['name'], current) assert_equal(200, response.status) # body assertion? end end def test_get_release_current with_app do |app_data| response = heroku.get_release(app_data['name'], 'current') assert_equal(200, response.status) # body assertion? end end def test_get_release_app_not_found assert_raises(Heroku::API::Errors::NotFound) do heroku.get_release(random_name, 'v2') end end def test_get_release_release_not_found assert_raises(Heroku::API::Errors::NotFound) do heroku.get_release(random_name, 'v0') end end def test_post_release with_app do |app_data| current = heroku.get_releases(app_data['name']).body.last['name'] response = heroku.post_release(app_data['name'], current) assert_equal(200, response.status) # body assertion? end end def test_post_release_app_not_found assert_raises(Heroku::API::Errors::NotFound) do heroku.post_release(random_name, 'v3') end end def test_post_release_release_not_found assert_raises(Heroku::API::Errors::NotFound) do heroku.post_release(random_name, 'v0') end end end
Version data entries
16 entries across 16 versions & 1 rubygems