Sha256: ac3388aaa99f40a55813c0f04797fcc01ce8061fbbda43cd4d459d4ec2b8268a

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

RSpec.describe RSpec::Grape::Entity::ItsExposure do
  include RSpec::Grape::Entity::DSL

  let(:entity) { TestEntity }

  its_exposure(:id)
  its_exposure("id")
  its_exposure(:id) { is_expected.to be_a Grape::Entity::Exposure::DelegatorExposure }
  its_exposure(:unknown) { is_expected.to be_nil }
  its_exposure("permissions.read") { is_expected.to be_a Grape::Entity::Exposure::DelegatorExposure }
  its_exposure("unknown.unknown") { expect { __attribute_exposure }.to raise_error NoMethodError }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-grape-entity-0.1.0 spec/its_exposure_spec.rb