Sha256: 13e752eecd683cee8f1d02ef99714e56b20b534e7ca9445be19f08cdea221550

Contents?: true

Size: 455 Bytes

Versions: 1

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

RSpec.describe RSpec::Grape::Entity::Matchers::BeSafeMatcher do
  include RSpec::Grape::Entity::Matchers::BeSafeMatcher

  let(:entity) { TestEntity }

  context "when safe" do
    subject(:exposure) { entity.find_exposure :user }
    it { is_expected.to be_safe }
  end

  context "when not safe" do
    subject(:exposure) { entity.find_exposure :id }
    it { is_expected.not_to be_safe }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-grape-entity-0.1.0 spec/matchers/be_safe_matcher_spec.rb