Sha256: 347734a58c2212c7a69ca74b432fa1e4963f425e6f88fc882f62aebf240d6e9f

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

require 'spec_helper'

describe 'PGit::Error::External' do
  it 'should take in the response' do
    response = '{
      "code": "unfound_resource",
      "kind": "error",
      "error": "The object you tried to access could not be found.  It may have been removed by another user, you may be using the ID of another object type, or you may be trying to access a sub-resource at the wrong point in a tree."
    }'
    external_error = PGit::Error::External.new(response)
    message = external_error.instance_eval { @message }

    expect(message).to eq(response)
  end

  it 'should inherit from PGit::Error' do
    ancestors = PGit::Error::External.ancestors

    expect(ancestors).to include PGit::Error
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pgit-1.0.0 spec/pgit/error/external_spec.rb