Sha256: 60a9460c379b657f295dc8f6c301472725da5e27da4642ae0b648e3a2c7d4b36

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe SolidusJwt::Preferences do
  let(:instance) { described_class.new }

  it { is_expected.to be_kind_of(Spree::Preferences::Configuration) }

  describe '#jwt_secret' do
    subject { instance.jwt_secret }

    it { is_expected.to eql Rails.application.secret_key_base }
  end

  describe '#allow_spree_api_key' do
    subject { instance.allow_spree_api_key }

    it { is_expected.to be true }
  end

  describe '#jwt_algorithm' do
    subject { instance.jwt_algorithm }

    it { is_expected.to eql 'HS256' }
  end

  describe '#jwt_expiration' do
    subject { instance.jwt_expiration }

    it { is_expected.to be 3600 }
  end

  describe '#jwt_options' do
    subject { instance.jwt_options }

    it { is_expected.to be_kind_of Hash }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_jwt-1.2.2 spec/lib/solidus_jwt/preferences_spec.rb
solidus_jwt-1.2.1 spec/lib/solidus_jwt/preferences_spec.rb
solidus_jwt-1.2.0 spec/lib/solidus_jwt/preferences_spec.rb