Sha256: 5cde532870795c8c261fda352644a21c3403a2df913f8d9f1f6eb74be3926c48

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

require 'spec_helper'

describe Grape::Exceptions::MissingMimeType do
  describe "#message" do

    let(:error) do
      described_class.new("new_json")
    end

    it "contains the problem in the message" do
      expect(error.message).to include "missing mime type for new_json"
    end

    it "contains the resolution in the message" do
      expect(error.message).to include "or add your own with content_type :new_json, 'application/new_json' "
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
grape-security-0.8.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.9.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.8.0 spec/grape/exceptions/missing_mime_type_spec.rb