Sha256: 383c164eaeb44fb66a7587ab9e4abdae22b3e3d67ca03b6ff115a880695b9d86

Contents?: true

Size: 815 Bytes

Versions: 1

Compression:

Stored size: 815 Bytes

Contents

require File.expand_path('../spec_helper', __FILE__)

ALLOWLIST_PATH = './spec/mocks/allowlist.json'

describe AllowlistResolver do
    describe 'functionality' do
        it 'allowlist should be loaded from an specific url' do
            allowlist = AllowlistResolver.instance.get_allowlist(ALLOWLIST_PATH)
            allowlist.size.should.equal 11
        end
        
        it 'if not URL is specified, allowlist comes from default URL' do
            allowlist = AllowlistResolver.instance.get_allowlist
            allowlist.should.not.empty?
        end

        it 'allowlist should not be loaded twice' do
            AllowlistResolver.instance.get_allowlist(ALLOWLIST_PATH)
            loaded = AllowlistResolver.instance.allowlist_loaded

            loaded.should.be.true    
        end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-whitelist-0.6.0 spec/allowlist_resolver_spec.rb