Sha256: 47ca9d7236464f0c65f0497cee94cef93e2b622e62b45a6805efbd59cdba4aba

Contents?: true

Size: 652 Bytes

Versions: 2

Compression:

Stored size: 652 Bytes

Contents

require 'spec_helper'
require 'active_support/core_ext'

describe 'ApiAuthenticator::Errors' do
  describe "InvalidTokenError" do
    it "should have a constructed_message" do
      error = ApiAuthenticator::InvalidTokenError.new(DateTime.now.utc, [[DateTime.now.utc, 'foobar', 'yolo']])
      expect(error.constructed_message).to match(/Invalid\sToken\sError/)
    end
  end
  describe "InvalidTimeError" do
    it "should have a constructed_message" do
      error = ApiAuthenticator::InvalidTimeError.new(DateTime.now.utc, DateTime.now.utc, DateTime.now.utc)
      expect(error.constructed_message).to match(/Invalid\sTime\sError/)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_authenticator-0.3.0 spec/errors_spec.rb
api_authenticator-0.2.1 spec/errors_spec.rb