Sha256: 065e25e0e3717a1755bbfb731b2b84b2d753add35e47c3286fe82004f45524fd
Contents?: true
Size: 995 Bytes
Versions: 3
Compression:
Stored size: 995 Bytes
Contents
require_relative '../test_helper' require_relative '../../lib/dogwatch/model/response' class TestResponse < MiniTest::Test def setup @error_res = DogWatch::Model::Response.new(ERROR_RES, 'error') @valid_res = DogWatch::Model::Response.new(VALID_RES, 'foobar') @accepted_res = DogWatch::Model::Response.new(ACCEPTED_RES, 'foobar') end def test_status_is_error assert_equal :error, @error_res.status end def test_status_is_accepted assert_equal :accepted, @accepted_res.status end def test_status_message assert_equal 'The following errors occurred when creating monitor error: ' \ "The value provided for parameter 'query' is invalid", \ @error_res.message end def test_message_output assert_equal 'Created monitor foobar with message foobar', @valid_res.message end def test_thor_output assert_equal [:created, 'Created monitor foobar with message foobar', :green], @valid_res.to_thor end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dogwatch-1.2.0 | test/dogwatch/test_response.rb |
dogwatch-1.1.1 | test/dogwatch/test_response.rb |
dogwatch-1.1.0 | test/dogwatch/test_response.rb |