diff options
Diffstat (limited to 'test/error.rb')
-rw-r--r-- | test/error.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/error.rb b/test/error.rb new file mode 100644 index 0000000..16a7077 --- /dev/null +++ b/test/error.rb @@ -0,0 +1,22 @@ +require_relative "setup.rb" + +class ErrorTest < MiniTest::Test + + def test_bad_request + object = OpenTox::Feature.new + assert_nil OpenTox::Feature.find(object.id) + end + + def test_error_methods + assert_raises OpenTox::ResourceNotFoundError do + resource_not_found_error "This is a test" + end + end + + def test_exception + assert_raises Exception do + raise Exception.new "Basic Exception" + end + end + +end |