Sha256: 0c433f6e9c45c9a79d73379c9c3adde496eb5945c5e8cecd47b2ec3d81b04203

Contents?: true

Size: 700 Bytes

Versions: 15

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(false) }
    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

15 entries across 15 versions & 1 rubygems

Version Path
finapps_core-2.0.16 spec/rest/credentials_spec.rb
finapps_core-2.0.15 spec/rest/credentials_spec.rb
finapps_core-2.0.14 spec/rest/credentials_spec.rb
finapps_core-2.0.13 spec/rest/credentials_spec.rb
finapps_core-2.0.12 spec/rest/credentials_spec.rb
finapps_core-2.0.11 spec/rest/credentials_spec.rb
finapps_core-2.0.10 spec/rest/credentials_spec.rb
finapps_core-2.0.9 spec/rest/credentials_spec.rb
finapps_core-2.0.8 spec/rest/credentials_spec.rb
finapps_core-2.0.7 spec/rest/credentials_spec.rb
finapps_core-2.0.6 spec/rest/credentials_spec.rb
finapps_core-2.0.5 spec/rest/credentials_spec.rb
finapps_core-2.0.4 spec/rest/credentials_spec.rb
finapps_core-2.0.3 spec/rest/credentials_spec.rb
finapps_core-2.0.2 spec/rest/credentials_spec.rb