Sha256: df7c6b737ae3313357dbe6f4333f5b7ec98984d972bdae5d964587382a60cd62

Contents?: true

Size: 699 Bytes

Versions: 4

Compression:

Stored size: 699 Bytes

Contents

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

    context 'when missing token' do
      it { expect(FinAppsCore::REST::Credentials.new(:identifier, nil).valid?).to eql(false) }
    end

    context 'when missing both identifier and token' do
      it { expect(FinAppsCore::REST::Credentials.new(nil, nil).valid?).to eql(false) }
    end

    context 'when having identifier and token' do
      it { expect(FinAppsCore::REST::Credentials.new(:identifier, :token).valid?).to eql(true) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
finapps_core-2.0.20 spec/rest/credentials_spec.rb
finapps_core-2.0.19 spec/rest/credentials_spec.rb
finapps_core-2.0.18 spec/rest/credentials_spec.rb
finapps_core-2.0.17 spec/rest/credentials_spec.rb