Sha256: 5d7e8e0cad1dd8783889a0f97c4fd19588ed122d694a4874f5c95db2cd11f997
Contents?: true
Size: 775 Bytes
Versions: 19
Compression:
Stored size: 775 Bytes
Contents
require File.expand_path('../../test_helper', __FILE__) module Checkr class ApiResourceTest < Test::Unit::TestCase should 'have an id attribute' do assert(APIResource.method_defined?(:id)) assert(APIResource.method_defined?(:id=)) end should 'have an object attribute' do assert(APIResource.method_defined?(:object)) assert(APIResource.method_defined?(:object=)) end should 'have a default path' do mr = MockResource.new('fake_id') assert_equal("#{MockResource.path}/fake_id", mr.path) end should 'raise an InvalidRequestError when no ID is present for instance path' do @mock.expects(:get).never c = MockResource.new assert_raises(InvalidRequestError) { c.refresh } end end end
Version data entries
19 entries across 19 versions & 1 rubygems