Sha256: be78be985437e4534cd79b41ca51870d263a19034b55c77e10d5804b63cfbd1d

Contents?: true

Size: 636 Bytes

Versions: 11

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

RSpec.describe FinAppsCore::REST::Credentials do
  describe '#valid?' do
    context 'when missing identifier' do
      it { expect(described_class.new(nil, :token).valid?).to be(true) }
    end

    context 'when missing token' do
      it { expect(described_class.new(:identifier, nil).valid?).to be(false) }
    end

    context 'when missing both identifier and token' do
      it { expect(described_class.new(nil, nil).valid?).to be(false) }
    end

    context 'when having identifier and token' do
      it { expect(described_class.new(:identifier, :token).valid?).to be(true) }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
finapps_core-6.0.2 spec/rest/credentials_spec.rb
finapps_core-6.0.1 spec/rest/credentials_spec.rb
finapps_core-6.0.0 spec/rest/credentials_spec.rb
finapps_core-5.0.16 spec/rest/credentials_spec.rb
finapps_core-5.0.15 spec/rest/credentials_spec.rb
finapps_core-5.0.14 spec/rest/credentials_spec.rb
finapps_core-5.0.13 spec/rest/credentials_spec.rb
finapps_core-5.0.11 spec/rest/credentials_spec.rb
finapps_core-5.0.10 spec/rest/credentials_spec.rb
finapps_core-5.0.9 spec/rest/credentials_spec.rb
finapps_core-5.0.8 spec/rest/credentials_spec.rb