Sha256: daf39b5151f857dd8a3ed2cefee4b6363634e7f1b7850492aaba787f90e7183b

Contents?: true

Size: 700 Bytes

Versions: 21

Compression:

Stored size: 700 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

21 entries across 21 versions & 1 rubygems

Version Path
finapps_core-5.0.7 spec/rest/credentials_spec.rb
finapps_core-5.0.6 spec/rest/credentials_spec.rb
finapps_core-5.0.5 spec/rest/credentials_spec.rb
finapps_core-5.0.4 spec/rest/credentials_spec.rb
finapps_core-5.0.3 spec/rest/credentials_spec.rb
finapps_core-5.0.2 spec/rest/credentials_spec.rb
finapps_core-5.0.1 spec/rest/credentials_spec.rb
finapps_core-5.0.0 spec/rest/credentials_spec.rb
finapps_core-4.0.7 spec/rest/credentials_spec.rb
finapps_core-4.0.6 spec/rest/credentials_spec.rb
finapps_core-4.0.5 spec/rest/credentials_spec.rb
finapps_core-4.0.4 spec/rest/credentials_spec.rb
finapps_core-4.0.3 spec/rest/credentials_spec.rb
finapps_core-4.0.2 spec/rest/credentials_spec.rb
finapps_core-4.0.0 spec/rest/credentials_spec.rb
finapps_core-3.0.6 spec/rest/credentials_spec.rb
finapps_core-3.0.5 spec/rest/credentials_spec.rb
finapps_core-3.0.3 spec/rest/credentials_spec.rb
finapps_core-3.0.1 spec/rest/credentials_spec.rb
finapps_core-2.1.2 spec/rest/credentials_spec.rb